<script language=JavaScript>
2 回答
达令说
TA贡献1821条经验 获得超6个赞
123456789101112131415161718 | <script language=JavaScript> var url1440x900= "index.htm" , url1280x1024= "index1280.htm" , _url; document.onreadystatechange = function (){ if ((screen.width==1440) && (screen.height==900)){ _url = url1440x900; } else if ((screen.width==1280) && (screen.height==1024)) { _url = url1280x1024; } else { _url = url1280x1024; } window.location.href = _url; }(); </script> |
月关宝盒
TA贡献1772条经验 获得超5个赞
<script language=JavaScript> function yemian1280(){ var url1440x900="index.htm"; var url1280x1024="index1280.htm"; if ((screen.width==1440) && (screen.height==900)){ window.location.href= url1440x900; }else if ((screen.width==1280) && (screen.height==1024)) { window.location.href=url1280x1024; }else{ window.location.href=url1280x1024; } } </script> 你复制过去试试看你的引号和&都用的中文的。 是的。(感谢 李岩120),注意调用。。不调用的时候肯定是没反应的 <body onload="yemian1280()">
添加回答
举报
0/150
提交
取消