Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div id="ad54"></div>
- window.onload = function(){
- var link = "http://www.google.com"
- var iframe = document.createElement('iframe');
- iframe.frameBorder=0;
- iframe.width="300px";
- iframe.height="250px";
- iframe.id="randomid";
- iframe.setAttribute("src", link);
- document.getElementById("ad54").appendChild(iframe);
- }
- taken from this answer
- http://stackoverflow.com/questions/10302109/create-iframe-with-javascript-appending-to-a-div
Advertisement
Add Comment
Please, Sign In to add comment