我有一个表单,我试图提交后,页面加载和5秒已经通过..我已经尝试了setTimeout,但它似乎不工作..任何人都可以建议为什么会这样,我有jQuery在站点,但couldnt得到delay()工作
- Your Cart
- Your Details
- Payment
- Confirmation
Please wait while we we redirect you to
Paypal for a secure payment method.
Paypal for a secure payment method.
window.οnlοad=function(){
window.setTimeout(document.cartCheckout.submit(), 5000);
};
任何帮助将不胜感激,谢谢提前
编辑:
window.οnlοad=function(){
var counter = 5;
var interval = setInterval(function() {
counter--;
$("#seconds").text(counter);
if (counter == 0) {
redirect();
clearInterval(interval);
}
}, 1000);
};
function redirect() {
document.checkout_paypal.submit();
}