javascript - How can I get an iframe to open a site saved in a variable? -
i making iframe browser program; it's pretty basic. going add bookmark feature prompt popped , saved site wanted bookmark variable. realized don't know how make iframe open site saved in variable. can me?
you can set source of iframe using attr()
method if have iframe.
$('#myframe').attr('src', 'http://example.org/')
if don't have iframe, can append new iframe page.
$('#mysection').append("<iframe id='myframe'>")
Comments
Post a Comment