私はjavascriptが初めてで、ページが開いたときに簡単なダイアログを開こうとしていますが、単に表示されるだけです
ダイアログのテキストは、通常の段落であり、ダイアログはありません。これが私のindex.htmlです:
<html xmlns=\ "http://www.w3.org/1999/xhtml\" xml:lang=\"en\">
<head>
<META HTTP-EQUIV="Content-Script-Type" CONTENT="text/javascript">
<script type='text/javascript' src='js/jquery.js'></script>
<title>Welcome to Jetty-9</title>
<style type="text/css" title="maincss">
@import url(maincss.css);
</style>
<script type="text/javascript">
$(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>
そして、私の maincss.css は、本文に背景画像を配置するだけで、js/jquery.js ファイルは jquery の最新バージョンであり、ページをロードし、ページのソースを表示してから開くことで、正しくリンクされていることを確認しましたjsファイルをクリックして