当前位置: 代码迷 >> ASP >> 请高手帮小弟我翻译下这个函数MM_reloadPage(init)
  详细解决方案

请高手帮小弟我翻译下这个函数MM_reloadPage(init)

热度:784   发布时间:2012-03-12 12:45:33.0
请高手帮我翻译下这个函数MM_reloadPage(init)

function   MM_reloadPage(init)   {  
if   (init==true)   with   (navigator)   {if   ((appName== "Netscape ")&&(parseInt(appVersion)==4))   {  
document.MM_pgW=innerWidth;   document.MM_pgH=innerHeight;   onresize=MM_reloadPage;   }}  
else   if   (innerWidth!=document.MM_pgW   ||   innerHeight!=document.MM_pgH)   location.reload();  
}  
MM_reloadPage(true);  
请高手帮我逐句翻译下,谢谢~


------解决方案--------------------
if (init==true)
with (navigator)
{
if ((appName== "Netscape ")&&(parseInt(appVersion)==4)) //判断浏览器是不是ns的还有版本是不是4
{
document.MM_pgW=innerWidth; //设置个自定义属性
document.MM_pgH=innerHeight; //同上
onresize=MM_reloadPage; //把一个函数给到另外一个 }
}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) //判断是不是相等
location.reload(); //重载页面
}
  相关解决方案