html+js代码|按钮随机跳转
更新时间:2024-07-11 04:37:14
访问次数:711
<div class="enter-link"> <script language="javascript"> function test() { var url = new Array(); url[0] = "http://www.clxsite.cn"; url[1] = "http://www.liangshengfaka.cn"; url[2] = "http://www.fuzhufakawang.com"; var ints = parseInt(Math.random() * (url.length)); // window.open(url[ints]); //新窗口打开 window.location.href = url[ints]; //本窗口打开 } </script> <a href="javascript:test()"><span class="c_blue">点击这里进入本网站</span></a> </div>
网友评论