为啥点击onclick没反应 确定引用了jquery?按f12打开调试窗口,再点击提交按钮,看看哪里报错 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 你的alert(123);能出来不。顺便你Validation() 方法里面的这些 var taskName = $("#txtTaskName"); …… if ($(taskName).val().length == 0) { alert("请输入任务名称"); $(taskName).focus(); return false; } ……都换成这样 if ($("#txtTaskName").val().length == 0) { alert("请输入任务名称"); $("#txtTaskName").focus(); return false; } ……你上面那样有没有多此一举的感觉?我怀疑你的问题就出现在这儿。瞎猜的。 function Validation() { var taskName = $("#txtTaskName"); var itemUrl = $("#txtItemUrl"); var amount = $("#txtAmount"); var taskNum = $("#txtTaskNum"); var commission = $("#txtChargeFee") var taskRe =escape(editor.html()); if ($(taskName).val().length == 0) { alert("请输入任务名称"); $(taskName).focus(); return false; } else if ($(itemUrl).val().length == 0) { alert("请输入宝贝地址"); $(itemUrl).focus(); return false; } else if ($(amount).val().length == 0) { alert("请输入任务金额"); $(amount).focus(); return false; } else if ($(taskNum).val().length == 0) { alert("请输入任务数量"); $(taskNum).focus(); return false; } else if ($(commission).val().length == 0) { alert("请输入佣金金额"); $(commission).focus(); return false; } else if ($(taskRe).val().length == 0) { alert("请你仔细说明任务购买流程"); $(taskRe).focus(); return false; } else return true; }貌似应该改成: function Validation() { var taskRe =escape(editor.html()); if ($("#txtTaskName").val().length == 0) { alert("请输入任务名称"); $("#txtTaskName").focus(); return false; } else if ($("#txtItemUrl").val().length == 0) { alert("请输入宝贝地址"); $("#txtItemUrl").focus(); return false; } else if ($("#txtAmount").length == 0) { alert("请输入任务金额"); $("#txtAmount").focus(); return false; } else if ($("#txtTaskNum").val().length == 0) { alert("请输入任务数量"); $("#txtTaskNum").focus(); return false; } else if ($("#txtChargeFee").val().length == 0) { alert("请输入佣金金额"); $("#txtChargeFee")focus(); return false; } //这里你看看api else if (escape(editor.html()).length == 0) { alert("请你仔细说明任务购买流程"); ; return false; } else return true; } 不行,,那个弹不出alert(213),进入不了addtask方法,,是什么情况 打开谷歌浏览器,F12, 看JS哪里报错了 . 上传图片 改变大小 一个优化sql语句的问题,立马结 Gridview 的导出 出现乱码 config问题 存储过程语法问题?????? 关于GirdView隐藏行的问题。 如何开发手机上的WEB程序 为什么我这段连续横向滚动的js程序只滚动一次就不动了? ×××vs2005bate2的asp.net编译问题××× [高分讨论,UP有分!]关于把excel导入到数据库的讨论! MVC4 asp.net mvc 如何组件化
顺便你Validation() 方法里面的这些
var taskName = $("#txtTaskName");
……
if ($(taskName).val().length == 0) { alert("请输入任务名称"); $(taskName).focus(); return false; }
……
都换成这样
if ($("#txtTaskName").val().length == 0) { alert("请输入任务名称"); $("#txtTaskName").focus(); return false; }
……
你上面那样有没有多此一举的感觉?我怀疑你的问题就出现在这儿。瞎猜的。
function Validation()
{
var taskName = $("#txtTaskName");
var itemUrl = $("#txtItemUrl");
var amount = $("#txtAmount");
var taskNum = $("#txtTaskNum");
var commission = $("#txtChargeFee")
var taskRe =escape(editor.html()); if ($(taskName).val().length == 0) { alert("请输入任务名称"); $(taskName).focus(); return false; }
else if ($(itemUrl).val().length == 0) { alert("请输入宝贝地址"); $(itemUrl).focus(); return false; }
else if ($(amount).val().length == 0) { alert("请输入任务金额"); $(amount).focus(); return false; }
else if ($(taskNum).val().length == 0) { alert("请输入任务数量"); $(taskNum).focus(); return false; }
else if ($(commission).val().length == 0) { alert("请输入佣金金额"); $(commission).focus(); return false; }
else if ($(taskRe).val().length == 0) { alert("请你仔细说明任务购买流程"); $(taskRe).focus(); return false; }
else
return true; }貌似应该改成: function Validation()
{
var taskRe =escape(editor.html()); if ($("#txtTaskName").val().length == 0) { alert("请输入任务名称"); $("#txtTaskName").focus(); return false; }
else if ($("#txtItemUrl").val().length == 0) { alert("请输入宝贝地址"); $("#txtItemUrl").focus(); return false; }
else if ($("#txtAmount").length == 0) { alert("请输入任务金额"); $("#txtAmount").focus(); return false; }
else if ($("#txtTaskNum").val().length == 0) { alert("请输入任务数量"); $("#txtTaskNum").focus(); return false; }
else if ($("#txtChargeFee").val().length == 0) { alert("请输入佣金金额"); $("#txtChargeFee")focus(); return false; }
//这里你看看api else if (escape(editor.html()).length == 0) { alert("请你仔细说明任务购买流程"); ; return false; }
else
return true; }