1
$(document). ready(function() {
alert("clicked");
});

how to check if alert is clicked OK using jquery . I know how to do using a prompt or confirmation

4

2 に答える 2

8

alert呼び出しの後にコードを追加するだけです:

$(document). ready(function() {
    alert("clicked");
    // code here is executed after the `alert` dialog was dismissed
});

これは、 (またはalertと同様に) JS の実行をブロックするために機能します。confirmprompt

OKクリックされたのか、ダイアログが閉じられたのかはわかりません。

于 2013-08-07T12:14:57.070 に答える
0
$(document). ready(function() {
    alert("clicked"); //first ok 
    alert("click has been detected") //alert to detect the first ok
});
于 2013-08-07T12:16:16.323 に答える