<!DOCTYPE html>
<head>
<title>tian an men</title>
</head>
<body>
<script>
window.onload = function(){
let exile = 0;
exile = Math.floor(Math.random()*10);
switch(exile) {
case 1:
window.location.replace("https://tuidang.epochtimes.com/' target="_blank">https://tuidang.epochtimes.com/' target="_blank">https://tuidang.epochtimes.com/' target="_blank">https://tuidang.epochtimes.com/");
break;
case 2:
window.location.replace("https://tuidang.epochtimes.com/' target="_blank">https://tuidang.epochtimes.com/' target="_blank">https://tuidang.epochtimes.com/' target="_blank">https://tuidang.epochtimes.com/");
break;
case 3:
break;
case 4:
break;
case 5:
break;
case 6:
break;
case 7:
break;
case 8:
break;
case 9:
break;
case 10:
break;
defualt:
window.location.replace("https://tuidang.epochtimes.com/' target="_blank">https://tuidang.epochtimes.com/' target="_blank">https://tuidang.epochtimes.com/' target="_blank">https://tuidang.epochtimes.com/")
break;
}
}
</script>
</body>
곧 중3되는 급식인데 코드 어케 바꿔야 더 짱깨가 좆같을지 알려주시면 고맙겠노
switch대신 배열이랑 인덱스 쓰면 값 추가할때 편할듯 랜덤도 length 곱해서 구할 수 있고 - dc App
지적 감사합니다
배열에 링크를 넣자
슨상님 말대로 고쳐봤습니다
https://gall.dcinside.com/mgallery/board/view/?id=github&no=32593&page=1