<html>
<head>
<script type="text/javascript" src="../js/jquery-1.4.min.js"></script>
GET http://localhost:8080/js/jquery-1.4.min.js 404 (/js/jquery-1.4.min.js) //这个是报错信息
<script type="text/javascript">
//表示表单各项是否通过检查
//通过检查设置为true,否则设置为false
var checkflag = {
"no" : false
};
$(function() {
Uncaught ReferenceError: $ is not defined//这个也是报错信息
//任务编号检查
checkflag.no=false;
$("#taskNo").blur(function() {
var no = $("taskNo").val();
$("#no_error").html("");
if (no == "") {
$("#no_error").html("任务编号不能为空");
alert("test");
} else {
//唯一性
//发送ajax
$.post("taskNo.action", {
"no" : no
}, function(ok) {
if (ok) {
checkflag.code = true;
$("#no_error").html("可以使用");
} else {
$("#no_error").html("任务编号重复");
}
});
}
});
});
//form 的on submit事件
$(function() {
$("#f").submit(function() {
$("#taskNo").blur();
alert("submit");
return checkflag.no;
});
});
</script>

解决方案 »

  1.   

    jquery-1.4.min.js这个文件不存在或者路径错误。
      

  2.   

    GET http://localhost:8080/js/jquery-1.4.min.js 404 (/js/jquery-1.4.min.js) //这个是报错信息
    楼上这是js没引用到,是路径问题吧
    Uncaught ReferenceError: $ is not defined//这个也是报错信息
    jquery没加载出来 肯定报$ is not defined还是看看src="../js/jquery-1.4.min.js路径对不对
      

  3.   

    主机是什么操作系统,如果是类UNIX系统的话,文件名区分大小写,你仔细检查一下。
      

  4.   

    页面加载出来你F12查看下这个jquery-1.4.min.js加载到页面中没
      

  5.   

    src="../js/jquery-1.4.min.js"看你这路径应该是js这个文件夹就在项目中,引用这个js的页面在另外一个文件中了吧,那你试试<script type="text/javascript" src="../js/jquery-1.4.min.js"></script>
    换成<script type="text/javascript" src="http://localhost:8080/js/jquery-1.4.min.js "></script>
    然后页面加载出来了F12一定要查看下jquery-1.4.min.js这个js脚本代码加载出来没