Source code

Revision control

Copy as Markdown

Other Tools

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Nested Iframe Container</title>
</head>
<body>
<h2>Same-Origin Middle Iframe (example.com)</h2>
<div id="nested-container"></div>
<script type="text/javascript">
// Pass rand parameter to nested iframe
const params = new URLSearchParams(location.search);
const rand = params.get("rand");
if (rand) {
const container = document.getElementById("nested-container");
const iframe = document.createElement("iframe");
iframe.id = "nested-iframe";
container.appendChild(iframe);
}
</script>
</body>
</html>