61,110
社区成员
发帖
与我相关
我的任务
分享
eval(function(){var x;if(x = my("123","2","4")){console.log(x);console.log(window.frameElement)}else {console.log(window.frameElement)}}())
<html>
<body>
</body>
<script>
function my(x,y,z){return x.replace(y,z)}
console.log(window.frameElement)
var o = document.body;
console.log(o)
var el=document.createElement("iframe");
el.setAttribute("id", "iframe1");
o.appendChild(el);
var i = document.getElementById("iframe1");
var es=document.createElement("script");
es.setAttribute("type", "text/javascript");
es.setAttribute("src", "t.js");
i.appendChild(es);
console.log(document.getElementById("iframe1"))
</script>
</html>