Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php iframe add content

<script>
function createElementMY(){
    var doc = document.getElementById('container');

    var ifrDoc = doc.contentDocument;


    var elem = ifrDoc.createElement("div");
    elem.textContent = 'Test';
    ifrDoc.body.appendChild(elem);
}
</script>
<iframe id="container" src="data:text/html,rawr"></iframe>
<button onclick="createElementMY()">Click me!</button>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #iframe #add #content
ADD COMMENT
Topic
Name
9+3 =