function loadTopWindow(){ if (window.top!=null && window.top.document.URL!=document.URL){ window.top.location= document.URL; } }
<!--在body的写上onload事件要调用的方法-->
<body onload="loadTopWindow()">
function loadTopWindow(){ if (window.top!=null && window.top.document.URL!=document.URL){ window.top.location= document.URL; } }
<!--在body的写上onload事件要调用的方法-->
<body onload="loadTopWindow()">