Jquery-widget-dialog

提供:Dev Guides
移動先:案内検索

jQuery-ウィジェットダイアログ

説明

*Widget Dialog* 関数は、JqueryUIのウィジェットで使用できます。 ダイアログボックスは、HTMLページに情報を表示する優れた方法の1つです。 ダイアログボックスは、タイトルとコンテンツ領域を備えたフローティングウィンドウです。 このウィンドウは、デフォルトで「X」アイコンを使用して移動、サイズ変更、およびもちろん閉じることができます。

構文

ここにダイアログを使用する簡単な構文があります-

$( "#dialog" ).dialog();

以下は、ダイアログの使用方法を示す簡単な例です-

<!doctype html>
<html lang = "en">
   <head>
      <meta charset = "utf-8">
      <title>jQuery UI Dialog - Default functionality</title>

      <link rel = "stylesheet"
         href = "//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">

      <script type = "text/javascript"
         src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js">
      </script>

      <script type = "text/javascript"
         src = "https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/jquery-ui.min.js">
      </script>

      <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>

これにより、次の結果が生成されます–