默认
默认: 随机超链接
代码:
- <html>
- <head>
- <script type="text/javascript">
- function openLink(e) {
- var url = new Array();
- url[0] = "http://www.baidu.com";
- url[1] = "http://www.csdn.net";
- url[2] = "http://bbs.voc.com.cn";
- var ints = parseInt(Math.random() * (url.length));
- e.href = url[ints];
- return false;
- }
- </script>
- </head>
- <body>
- </body>
- <a href="#" onclick="openLink(this)" target="_blank" rel="nofollow noopener noreferrer">Try to Click</a>
- </html>