我有以下功能同步jQuery的警報
function test()
{
jAlert("One","DescriptionOne"); // First jAlert
jAlert("Two","DescriptionOne"); // Second jAlert
window.location = 'test.html'
}
當運行這段代碼,第一jAlert來了,不點擊OK按鈕消失。現在,第二個jAlert也會發生同樣的情況。最後test.html直接加載 而不點擊任何OK按鈕。我知道我必須提供回調函數,但我的要求是不使用任何回調函數。
請幫助我如何,
- 使第二個jAlert等到用戶點擊第一jAlert
- 負荷的確定按鈕點擊的test.html第二jAlert的確定按鈕後。
使用異步功能,而不回調[jQuery的警報-jAlert單擊OK(http://stackoverflow.com/questions/10088615/jquery-alert-jalert-ok-click) – undefined 2013-04-29 07:34:23
可能重複?祝你好運!請參閱@ Toverbal的答案:) – TheBronx 2013-04-29 07:37:18