各种用途的按钮 dn001 2009-06-21 08:22:24 <!-- 把如下代码加入<body>区域中 --> <!-- web http://www.knowsky.com --> <!-- bbs http://www.knowsky.com/bbs--> <!-- 脚本说明: 把如下代码加入<body>区域中: --> <script> alert("你可以输入1,2,3,4,5分别进入不同的网站,如果输入不对页面就会没现象") </script> <script language="JavaScript"> right1 = "http://www.knowsky.com"; right2 = "http://www.knowsky.com/web"; right3 = "http://www.knowsky.com/flash"; right4 = "http://www.knowsky.com/js"; right5 = "http://www.knowsky.com/bbs"; name1 = "1" name2 = "2" name3 = "3" name4 = "4" name5 = "5" var name = prompt("请输入你的数字",""); // if... else statement... right, // confirm this, wrong, go to // wrong... if (name ==name1) {location.href=right1} if (name ==name2) {location.href=right2} if (name ==name3) {location.href=right3} if (name ==name4) {location.href=right4} if (name ==name5) {location.href=right5} </script>