這是我的jQuery代碼:如何在提交表單之前在jquery中等待?
$('#txndatetime_reload_uk').val(values[2]);
$('#customerid_reload_uk').val(sanderEmail);
setTimeout(6000);
// alert('ok');
$('#activate_form_uk').submit();
我想等之前提交表單,持續6秒。
但是setTimeout(6000);
不起作用。
我在做什麼錯?
[文檔上window.setTimeout ](https://developer.mozilla.org/en/docs/Web/API/window.setTimeout)可能會對您有所幫助。 –
[JQuery,setTimeout not working]可能的重複(http://stackoverflow.com/questions/1495903/jquery-settimeout-not-working) – V31
謝謝@ZougenMoriver對於response.I現在明白了。 – unknownbits