1
爲什麼$(文件)。就緒(函數()在下面的例子不工作?
如果我把它拿出來,其他的jQuery語句的工作
alt text http://i36.tinypic.com/dmb9yg.jpg
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
<title>Text Page</title>
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("jquery", "1.3.2");
$(document).ready(function() {
$("p").css("background-color","green");
});
function highlightIt() {
$("p").css("background-color","yellow");
}
</script>
</head>
<body>
<p>this is a test</p>
<form action="">
<div>
<input type="button" value="highlight it" onclick="highlightIt()" />
</div>
</form>
</body>
</html>
很高興知道,謝謝 – 2009-09-26 13:39:47