我在php上使用header,現在我想用jQuery。當功能成功後,jquery自動更改頁面
if ($('form #response').hasClass('success')) {
setTimeout("$('form #response').fadeOut('fast')", 5000);
return window.location = index.php;
}
此行不行 - 我要改變頁面時.hasClass('success')
這裏
return window.location = index.php;
我試着不帶復位輸入代碼再沒有工作。
事實上,'window.location'讀/寫。你正在考慮'document.location'。 (即使如此,只能在IE中閱讀) – Samsquanch