上篇文章中,在普通页面可以使用,但是在服务器中并不能够运行。做如下替代方案

//Default.js
function OpenPage(URL)
{
    
var wins=window.open(URL,"test","scrollbars=yes,resizable=yes,toolbar=no,status=yes");
    
if(wins==null)
    
{
        window.location
=URL;
    }

    
else
    
{
        window.opener
=null;
        window.close();
    }

}


function Maxsize(URL)
{
    window.moveTo(
0,0);
    window.resizeTo(screen.availWidth ,screen.availHeight);
    window.location
=URL;
}
<!--Default.html-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    
<title>测试程式</title>
    
<script type="text/javascript" language="javascript" src="Default.js">
    
</script>
</head>
<body onload="OpenPage('index.html');">
</body>
</html>
<!--index.html-->
<html xmlns="http://www.w3.org/1999/xhtml">
    
<head>
        
<title>最大化页面</title>
        
<script type="text/javascript" language="javascript" src="Default.js"> 
        
</script>
    
</head>
    
<body onload="Maxsize('http://blog.csdn.net/wkjs/archive/2007/10/22/1837245.aspx');">
    
</body>
</html>
posted on 2007-10-22 15:02  wkjs  阅读(162)  评论(0编辑  收藏  举报