为什么这个jquery没有工作,根据firebug没有找到javascript行:
<!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>
<script type="text/javascript"
src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("jquery", "1.4.0");
google.setOnLoadCallback(function() {
$("p").css("background-color","red");
}
</script>
</head>
<body>
<p>test</p>
</body>
</html>
答案 0 :(得分:4)
您的右括号)
:
google.load("jquery", "1.4.0");
google.setOnLoadCallback(function() {
$("p").css("background-color","red");
}); // <--- Here