<body onload=“reset()”
> <div id="part1"> some thing here .... <div> <ifame src="xxxx"/> <script> function reset(){ var height = window.innerHeight; document.getElementById("part1").style.minHeight = height+"px"; } </script> </body>
在一個html頁面中,通過iframe包含另一個頁面的時候,導致onload=“reset()”失效
解決:把<iframe>移到script后面,原因未明