61
rated 0 times
[
64]
[
3]
/ answers: 1 / hits: 67420
/ 10 Years ago, thu, october 9, 2014, 12:00:00
I just want to know how can I display an iframe
on button click
Here is my code:
function postYourAdd () {
var iframe = $(#forPostyouradd);
iframe.attr(src, iframe.data(src));
}
<button id=postYourAdd onclick=postYourAdd()>Button</button>
<iframe id=forPostyouradd data-src=http://www.w3schools.com src=about:blank width=200 height=200 style=background:#ffffff></iframe>
More From » jquery