代码1:最常用的代码,比较简单
代码2:
以下代码放在之间:
以下代码放在Tag里:
代码3: 代码如下:
代码4:
<script> <BR>var mywidth <BR>if (navigator.appName.indexOf('Netscape') != -1) { <BR>mywidth=parseInt(window.outerWidth)-28; <BR>//alert("ns") <BR>} <BR>else{ <BR>if (navigator.appName.indexOf('Microsoft') != -1) { <BR>mywidth=document.body.clientWidth; <BR>//alert("ie") <BR>} <BR>} <BR>var ScreenOffset; <BR>if (mywidth <= 778) { <BR>//alert("1") <BR>}else{ <BR>ScreenOffset = parseInt((mywidth - 778)/2); <BR>ScreenOffset = 0; <BR>// alert("2") <BR>} <BR>fwLoadMenus(); <BR>window.onresize = function (){ <BR>if (navigator.appName.indexOf('Netscape') != -1) { <BR>mywidth=parseInt(window.outerWidth)-28; <BR>if(self.screenLeft>0){ <BR>maximize.Click(); <BR>} <BR>} <BR>else{ <BR>if (navigator.appName.indexOf('Microsoft') != -1) { <BR>mywidth=document.body.clientWidth; <BR>if(self.screenLeft>0){ <BR>maximize.Click(); <BR>} <BR>} <BR>} <BR>} <BR>function ChangeLocation(){ <BR>var size = screen.width; <BR>if(size!="1024"){ <BR>document.location="index_800_600.aspx"; <BR>} <BR>} <BR></script>