Answers for "can we html inside iframe tag"

11

html iframe tag

<iframe src="http://kidcreatorsteam.com" height="90px" width="40px"></iframe>
<!--I made an iframe! Yay! -->
Posted by: Guest on April-14-2020
0

use javascript to control iframe elements

<iframe id="myIFrame" src="thispage.html"
    width="100%" height="600"
    frameBorder="2">
</iframe>

// Get the iframe
const iFrame = document.getElementById('myIFrame');

// Let's say that you want to access a button with the ID `'myButton'`,
// you can access via the following code:
const buttonInIFrame = iFrame.contentWindow.document.getElementById('myButton');

// If you need to call a function in the iframe, you can call it as follows:
iFrame.contentWindow.yourFunction();
Posted by: Guest on May-02-2021

Code answers related to "can we html inside iframe tag"

Browse Popular Code Answers by Language