document createelement 28 27iframe 27 29 3b

Solutions on MaxInterview for document createelement 28 27iframe 27 29 3b by the best coders in the world

showing results for - "document createelement 28 27iframe 27 29 3b"
Jojo
29 Mar 2017
1var ifrm = document.createElement('iframe');
2ifrm.setAttribute('id', 'ifrm'); // assign an id
3
4//document.body.appendChild(ifrm); // to place at end of document
5
6// to place before another page element
7var el = document.getElementById('marker');
8el.parentNode.insertBefore(ifrm, el);
9
10// assign url
11ifrm.setAttribute('src', 'demo.html');
12