Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
比方说,我有一个模态对话框,它是嵌入式日期选择器。
和ajax调用。
$( "#dialog-form" ).dialog( "open" ); $.ajax({ url:'somewhere.php', type:'POST', data:something, });
有什么方法可以等待 ajax 调用,直到对话框关闭?
您可以使用对话框定义中的关闭选项来执行此操作:
$("#dialog-form").dialog({ close: function () { //ajax call here } });