我有2个函数。 First
包含Jquery-UI对话框,并从Second
函数调用。喜欢的东西:函数调用另一个函数javascript
function First() {
$('div').dialog({
buttons: {
"Ok": function() { /* code */
}
}
});
}
function Second() {
First();
/* rest of this function code is depend upon the "Ok button"
function code */
}
现在我的问题是,调用函数First
后脚本的执行不会等待dialog's Ok button press
。我该怎么做,所以只有在按下Ok button
之后,控制才能从功能First
返回?
使用OK按钮的回调选项 – Blaster
写OK功能的代码 –
移动'秒'功能'OK按钮first'函数调用后'代码'点击我 – TRR