日期:2014-05-16  浏览次数:20405 次

jquery 在IE中运行不了,在其他浏览器中正常
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>jquery</title>
<style>
<!--
.menuConment{ color:red; font-size:24px; text-decoration:none;}
 -->
</style>

<script language="javascript" src="xtcsh/js/jquery.min.js"></script>

<script language="javascript">
$(document).ready(function(){
$("#top a").addClass("menuConment");
})
</script>

</head>
<body>
<div id="top">
<div><a href="">php</a></div>
<div><a href="">jquery</a></div>
</div>
</body>
</html>




以上代码,在IE中没有反映,在其他浏览器正常,不知道问题出在哪里?

------解决方案--------------------
Lz,你先不要用你的那个js,改成下面的试试?
HTML code
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js" type="text/javascript"></script>