Adding an iframe by JAVASCRIPT -
i trying javascript adds iframe javascript. create iframe before tag.
you can see jsfiddle demo. dont want add tag. want add external .js file things on own!
use this
var newelem = createelement('script'); newelem.setattribute('src', 'http://example.com/js/script.js'); newelem.setattribute('type', 'text/javascript'); newelem.setattribute('language', 'javascript'); document.getelementbyid('idfromtheheadelem').appendchild(newelem);
Comments
Post a Comment