Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/409.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/71.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript ajaxForm不工作且未返回错误_Javascript_Jquery_Ajax_File Upload_Ajaxform - Fatal编程技术网

Javascript ajaxForm不工作且未返回错误

Javascript ajaxForm不工作且未返回错误,javascript,jquery,ajax,file-upload,ajaxform,Javascript,Jquery,Ajax,File Upload,Ajaxform,当我想使用jQuery ajaxForm时,我遇到了一个非常奇怪的问题 我想用进度百分比设置表单和上载文件 我的ajaxForm函数根本不是fire 这是我的代码,但我无法找出问题出在哪里,因为我没有得到任何错误。 功能接收器 { var frm=res.substr1,res.length-8; $+frm.find'.error'.eachfunction{$this.remove;}; ifobj['alert']!=未定义的$res.htmlobj['alert']; ifobj['fi

当我想使用jQuery ajaxForm时,我遇到了一个非常奇怪的问题

我想用进度百分比设置表单和上载文件

我的ajaxForm函数根本不是fire

这是我的代码,但我无法找出问题出在哪里,因为我没有得到任何错误。 功能接收器 { var frm=res.substr1,res.length-8; $+frm.find'.error'.eachfunction{$this.remove;}; ifobj['alert']!=未定义的$res.htmlobj['alert']; ifobj['field']!=未定义{ obj[“字段”中的forvar i { /*$+i.next'.error'.remove*/ ifobj['field'][i]!=$+i.after+obj['field'][i]+; } } ifobj['msgbox']!=未定义的alertobj['msgbox']; ifobj['location']!=未定义的文档。location=obj['location']; } 函数sendAjaxform、响应、加载程序、进度 { var frm=美元形式; frm.ajaxForm{ 数据类型:“json”, 数据:frm.serialize+'&_ajax=1', 发送前:函数{ $input[type='submit'].attr'disabled','disabled'; $progress.width'0%'.parent.progress.removeClass'hidd'; }, 上载进度:functionevent、position、total、percentComplete{ var pVel=完成百分比+'%'; $progress.widthpVel; }, 完成:functiondata{ 接收响应,未序列化数据; $progress.parent'.progress'.addClass'hidd'; $input[type='submit'].attr'disabled',null; } }; 返回false; }
我猜你错过了这个图书馆 在后面插入代码 jquery


我认为json中存在问题响应代码不正确有一次发生在我身上,它没有显示任何错误只是js Stop你能试着在sendAjax函数中添加警报看看它是否工作吗?是的,ajaxform不工作?你在sendAjax函数中添加警报了吗??当你运行时,没有警报出现??雷特?
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="http://malsup.github.com/jquery.form.js"></script>