首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > ASP >

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

2012-03-12 
请高手帮我翻译下这个函数MM_reloadPage(init) functionMM_reloadPage(init){if(inittrue)with(navigato

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

热点排行