我正在尝试使用 jQuery 显示网站的一部分,在此示例菜单文本中。我写了这段代码:
<html>
<head>
<style>
body{ font-size: 12px; font-family: Arial; }
#new-nav{width: auto; height: 200px;}
</style>
<script src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<body>
<b>Menu:</b>
<ol id="new-nav"></ol>
<script>
$("#new-nav").load("http://site.com/ #hmenus");
</script>
</body>
</html>
代码语法正确,但代码不起作用,不显示文本。