RT

基于js以礼拜x为判定的域名重定向程序

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<script type="text/javascript">
<!--
function Redirect()
{
var random = Math.round(Math.random()*10);
var week = new Date().getDay();
if (random == 0) {
window.location="https://www.cnhls.com/";
}
else if (week == 0) {
window.location="https://www.mcdonalds.com.cn/";
} else if (week == 1) {
window.location="https://www.mcdonalds.com.cn/";
} else if (week == 2) {
window.location="https://www.mcdonalds.com.cn/";
} else if (week == 3) {
window.location="https://www.bkchina.cn/";
} else if (week == 4) {
window.location="https://m.kfc.com.cn/";
} else if (week == 5) {
window.location="https://www.mcdonalds.com.cn/";
} else if (week == 6) {
window.location="https://www.mcdonalds.com.cn/";
}
}
Redirect();
//-->
</script>