[代码] js点击轮播随机超链接

[复制链接]
本站网友  发表于 2025-6-7 01:37 |阅读模式

轮播随机超链接

js代码
  1. <script>
  2. const links = [
  3.   "/down.php",
  4.   "/down.php",
  5.   "/down.php",
  6. ];

  7. function lds_download() {
  8.   const idx = Math.floor(Math.random() * links.length);
  9.   window.open(links[idx], '_blank');
  10. }
  11. </script>
复制代码


  1. onclick="lds_download()"
复制代码


删帖注销|手机版|AD66

GMT+8, 2026-1-26 20:31

Powered by Discuz!

© 20022-2026 Comsenz Inc.

快速回复 返回顶部 返回列表