jQuery的文件上传表单提交问题 [英] JQuery File Upload form submit issue

查看:108
本文介绍了jQuery的文件上传表单提交问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在制作文件上传控件,我有一个文件上传控件,我没有设置其样式显示,我有一个用于上传文件的按钮

OnClicking上载按钮,我正在打开fileupload''控件上载对话框,选择文件后,我必须提交表单,但是表单没有提交,甚至没有出现任何错误消息,以下是我的代码

I am making file upload control, I have a file upload control i have set its style display none and i have a button for uploading files

OnClicking the upload button i am opening fileupload'' control Upload dialog, after after selecting file i have to submit the form but the form is not submitting even not any error msg is appearing,below is my code

<input type="file" id="newimg" style="display: none">
<input type="button" id="updnewimg">


  $('#updnewimg').live('click', function () {
            $('#newimg').click();
        });


 $('#newimg').change(function () {
            $("#ImgForm").submit();

        });



ImgForm是我的表单的ID,我必须在这里使用按钮而不是Submit



where ImgForm is my form''s ID i''ve to use button here instead of submit

推荐答案

(' #updnewimg').live(' 点击',函数(){
('#updnewimg').live('click', function () {


(' #newimg' ).click(); });
('#newimg').click(); });


(' #newimg').change (函数(){
('#newimg').change(function () {


这篇关于jQuery的文件上传表单提交问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆