15 lines
505 B
HTML
15 lines
505 B
HTML
<!DOCTYPE html>
|
|
<body>
|
|
<iframe id="testFrame"></iframe>
|
|
<script>
|
|
document.getElementById('testFrame').contentDocument.body.innerHTML = "<div id='testElement' style='display: none'>TEST</div>"
|
|
|
|
setInterval(function() {
|
|
// Change the style of a display:none element.
|
|
var testFrame = document.getElementById("testFrame");
|
|
var testElement = testFrame.contentDocument.getElementById("testElement");
|
|
testElement.style["left"] = "" + Math.floor((Math.random() * 10) + 1) + "px";
|
|
}, 0);
|
|
</script>
|
|
</body>
|