0
我有confirm()函數的問題。它似乎忽略了setTimeout()
函數並立即調用它自己。如何使JS函數不能自調用?
我希望函數在調用之前等待600秒完成。
function stillThere() {
if(confirm("Your session has expired. Are you still here?")){
\t //Continue
} else{
\t window.location.href = "../logout.php";
}
}
setTimeout(stillThere, 600);
後'setTimeout' – Rayon
要設置600毫秒,而不是600它調用第二個 –