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

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -