进入页面时,系统会根据你所使用的浏览分辨率进行应的导航

王朝other·作者佚名  2006-11-24
宽屏版  字体: |||超大  

有什么问题请到<a href='/bbs/forums.php?fid=21'>论坛</a>中发表<br>

<!--# 特效来源:http://www.webjx.com/js -->

<!-- 把如下代码加入<body>区域中 -->

<table width=300 border=1 bordercolor=#000000>

<tr>

<td>

现在的电脑性能越来越好,好多人已经开始使用1024*768分辨率了,但是经常发生网页浏览不正常的情况,这个脚本可根据分辨率自动进行导航,在特定场合是非常有用的,你好好看看吧!!!

<script language="JavaScript1.2">

function ScreenGoToURL(Big,Medium) {

var screen_height = screen.height;

var screen_width = screen.width;

var buffer = (document.all || document.layers ||documentGetElementByID) ? 30 : 48;

if (screen_height >= 768) {

screen_width = 1024;

screen_height = 768;

var window_width = 1024-12;

var window_height = 768-buffer;

var window_top = 0;

var window_left = 0;

window.open(Big,'','resizable=no,status=yes,width=' + window_width + ',height=' + window_height + ',top=' + window_top + ',left=' + window_left + '');

} else {

screen_width = 800;

screen_height = 600;

var window_width = 800-12;

var window_height = 600-buffer;

var window_top = 0;

var window_left = 0;

window.open(Medium,'','resizable=no,status=yes,width=' + window_width + ',height=' + window_height + ',top=' + window_top + ',left=' + window_left + '');

}

}

</script>

<BODY onLoad="ScreenGoToURL('1024x768.html','800x600.html')">

</td>

</tr>

</table>

[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
© 2005- 王朝网络 版权所有