Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/78.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用javascript更改iframe中的onload值_Javascript_Html_Iframe_Onload - Fatal编程技术网

使用javascript更改iframe中的onload值

使用javascript更改iframe中的onload值,javascript,html,iframe,onload,Javascript,Html,Iframe,Onload,我有一个名为somepage.html的页面,另一个页面otherpage.html作为somepage.html中的iframe somepage.html的源代码是 <body><iframe src="otherpage.html name="frame"></body> 在IE中,您可以使用security=“restricted”。它不会做您想要的事情(完全禁用javascript),但应该强制IFRAME在不同的区域中运行,并阻止它访问您的页面

我有一个名为somepage.html的页面,另一个页面otherpage.html作为somepage.html中的iframe somepage.html的源代码是

<body><iframe src="otherpage.html name="frame"></body>

在IE中,您可以使用security=“restricted”。它不会做您想要的事情(完全禁用javascript),但应该强制IFRAME在不同的区域中运行,并阻止它访问您的页面


HTML5沙盒在实现时,可能也与您想要的内容非常接近。特别地。现在,您只需要在大多数用户的浏览器中实现它;)

别以为这会发生。我认为这是一个比这个评论更好的回答,尽管哈哈。
<body onload="somefunction()" onunload="otherfunction" >the other content here</body>