无法在jsp中包含jquery 1-4.4

时间:2011-01-23 06:08:16

标签: jquery jsp

我在jsp页面中使用jquery版本1-4.4。

以下警告框出现在我的Internet Explorer中。 alt text

alt text

这是我的jsp页面代码。

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<script type="text/javascript" src="js/jquery-1.4.4.min.js"></script>
<script type="text/javascript">
    $(document).ready(function() {
        $("a").click(function(event) {
            alert("Thanks for visiting!");
        });
    });

    $(document).ready(function() {
        alert("jquery version 1.4.4");
    });
</script>
<title>Insert title here</title>
</head>
<body>
<a href="http://jquery.com/">jQuery</a>
</body>
</html>

但同样的鳕鱼用jquery版本1.3.2运行。

为什么它不能与1.4.4版一起使用? 即使它不适用于jquery 1.3.2更高版本。

帮帮我!

1 个答案:

答案 0 :(得分:0)

通过访问浏览器中的js / jquery-1.4.4.min.js,确保可以访问该文件。

如果不是,那么只需更新文件的权限就可以了。