站长论坛
标题:
各种页面跳转特效(二)
[打印本页]
作者:
superadmin
时间:
2007-10-5 22:23
标题:
各种页面跳转特效(二)
<script language=javascript>
function randompage(){
var randomindex=Math.floor(Math.random()*3)+1;//如果你有四个就把3改成4,如果有5个,就把3改成5
alert(randomindex);
top.location.replace('index'+randomindex+'.htm');
}
randompage()
</script>
在index1.htm,index2.htm,index3.htm,index4.htm,index5中进行随机选择的
<Script language=VBscript>
<!--
Randomize()
Myvalue = Int((2 * Rnd) + 1)
if Myvalue=1 then
window.location="http://www.1qq.cn/index.php?styleid=7"
else
window.location="http://www.1qq.cn/index.php?styleid=8"
end if
//-->
</script>
在2者中任选一个跳转。
根据用户的分辨率进行选择跳转
<html>
<head>
<title>《八○年代学生社区》欢迎您!!!</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="JavaScript">
<!--
function redirectPage(){
var url800x600="http://100.netman.hk/bbs/index.php";
var url1024x768="http://100.netman.hk/bbs/index.php?styleid=4";
if ((screen.width==800)&&(screen.height==600))
window.location.href= url800x600;
else if ((screen.width==1024)&&(screen.height==768))
window.location.href=url1024x768;
else window.location.href=url800x600;
}
-->
</script>
</head>
<body onLoad="redirectPage()">
<script language="JavaScript" type="text/JavaScript">
<!--
var w=screen.width;
var h=screen.height;
document.write("系统已检测到您的分辨率为:");
document.write("<font size=3 color=red>");
document.write(w+"×"+h);
document.write("</font>");
document.write("正在进入页面转换,请稍候…");
//-->
</script>
<a href="http://100.netman.hk/bbs/index.php">如果您的浏览器没有自动跳转,请点击这里</a>
</body>
</html>
欢迎光临 站长论坛 (http://www.tzlink.com/bbs/)
Powered by Discuz! X3.2