0

ここではjqueryダイアログボックスを使用していますが、ユーザーがボタンをクリックしたり何も選択したりできないように、バックグラウンドコンテンツを無効にする必要があります。

しかし、それを行う方法。

<!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.3/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.3/jquery-ui.js"></script>
    <link rel="stylesheet" href="/resources/demos/style.css" />
    <script>
    $(function() {
    $( "#dialog" ).dialog();
    });
    </script>
    </head>
    <body>
    <div id="dialog" title="Basic dialog">
    <p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p>
    </div>
    </body>
    </html>
4

4 に答える 4

3

modal: trueダイアログで次のように設定します。

$("#dialog").dialog({
    modal: true
});
于 2013-10-09T13:05:01.597 に答える
2

組み込みmodalオプションを使用できます。

$( "#dialog" ).dialog({
     modal: true
});
于 2013-10-09T13:05:46.210 に答える
1

modal: true にオプションを追加しますdialog

$(function() {
   $( "#dialog" ).dialog({
       modal: true
   });
});

ダイアログを読む/#modal

于 2013-10-09T13:07:19.473 に答える
1
$( "#dialog" ).dialog({
     modal: true
});
于 2013-10-09T13:06:16.587 に答える