2017-09-11 17 views
0

このコードではダイアログボックスが表示されるはずですが、CLOSEボタンでテキストが表示されます。コードはJqueryのWebサイトから来たものです。jqueryウィンドウがコード化されて表示されない

<!doctype html> 
 
<html lang="en"> 
 
<head> 
 
    <meta charset="utf-8"> 
 
    <meta name="viewport" content="width=device-width, initial-scale=1"> 
 
    <title>jQuery UI Dialog - Default functionality</title> 
 
    <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"> 
 
    <link rel="stylesheet" href="/resources/demos/style.css"> 
 
    <script src="https://code.jquery.com/jquery-1.12.4.js"></script> 
 
    <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.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>

+0

は、ファイル・パスを確認しましたか?例えば ​​'/ resources/demos/style.css'のように?それはあなたの構造に存在しますか? – empiric

+1

私はあなたのコードを実行可能なスニペットに入れました。それは正常に動作するようです。コンソールのエラーを確認してください –

+0

コードスニペットが適切にレンダリングしています –

答えて

0

あなたのコードは、私のブラウザ(Safariの10.1.1)上で動作するようです。 ここから(またはJSFiddle)、または別のブラウザを使用して実行してみてください。 コード:

$(function() { 
 
    $("#dialog").dialog(); 
 
});
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"> 
 
<link rel="stylesheet" href="/resources/demos/style.css"> 
 
<script src="https://code.jquery.com/jquery-1.12.4.js"></script> 
 
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> 
 

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

関連する問題