日期:2014-05-17  浏览次数:20839 次

请高手帮我翻译下这个函数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(); //重载页面
}