刚开始练习 jQuery,但我似乎无法让任何功能正常工作。下面的代码是我一直在尝试运行的练习,但它不会输出所需的结果。有谁知道为什么?谢谢。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="EN" dir="ltr" xmlns="http://www/w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type"
content="text/xml; charset=utf-8" />
<title>change2.html</title>
<script type = "text/javascript"
src = "jquery-1.4.2.min.js">
</script>
<script type = "text/javascript">
//<![CDATA[
$(document).ready(changeMe);
function changeMe(){
$("#output").html("I've changed");
}
//]]>
</script>
</head>
<body>
<h1>Using the document.ready mechanism</h1>
<div id = "output">
Did this change?
</div>
</body>
</html>