0

アラート ボックスを jquery ダイアログ ボックスに変更するにはどうすればよいですか?

スクリプト コーディングの一部:

  if(answeredAnsData.length==8){
            for(var x=0;x<8;x++){
                $('#text'+(x)).attr('disabled','disabled');
            }
         window.alert("test"); //alert box here
        }
    });
4

2 に答える 2

3

確認コマンドを使用する必要があります

window.confirm("are you sure");

jquery からダイアログ ボックスを使用する場合は、ui 拡張機能を調べる必要があります。http://jqueryui.com/dialog/からの例

<!doctype html>

<html lang="en">
<head>
    <meta charset="utf-8" />
    <title>jQuery UI Dialog - Default functionality</title>
    <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css" />
    <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
    <script src="http://code.jquery.com/ui/1.10.2/jquery-ui.js"></script>
    <link rel="stylesheet" href="/resources/demos/style.css" />
    <script>
        $(function() {
            $( "#dialog" ).dialog();
        });
    </script>
</head>
<body>

これは、情報の表示に役立つデフォルトのダイアログです。ダイアログ ウィンドウは、「x」アイコンで移動、サイズ変更、および閉じることができます。

于 2013-05-02T06:30:44.993 に答える