I want to be able to change the contents of an html iframe tag, how do I do that?
Like something like this:
index.html
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<iframe src="a.html" id="if">
</body>
</html>
<script>
const iframe = document.getElementByID("if");
iframe.document.getElementByID("text").innerHTML = "text";
<script>
a.html
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p id="text">.</p>
</body>
</html>