- 左迁
-
* 回复内容中包含的链接未经审核,可能存在风险,暂不予完整展示!
这个需要用js实现。
代码如下:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>随机跳转</title>
</head>
<body>
<a href="javascript:;">点我跳转</a>
</body>
</html>
<script src="https://cdn.b*****.net/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script>
$(function(){
// 落地页的地址数组
let links = [
"https://1.com",
"https://2.com",
"https://3.com",
"https://4.com",
"https://5.com",
"https://6.com",
"https://7.com",
"https://8.com",
"https://9.com",
];
let r = Math.floor(Math.random()*(links.length));
// 点击跳转随机落地页
$("html").on("click", "a", function(){
location.href = links[r];
});
});
</script>