ajaxSubmit

https://files.cnblogs.com/humble/jquery.form.js

 

 

function ajaxSubmit(action, formID,hasFile) {
            var options = {
                url:action,
                dataType: "json",
                type: 'POST',
                success: function (json) {
                    alert(json);
                }
            };
            var form = $('#' + formID);
            if (hasFile == true) {
                form.attr("enctype", "multipart/form-data");
            }
            $('#'+formID).ajaxSubmit(options);
        } 

posted @ 2010-11-20 20:40  [秦时明月]  阅读(748)  评论(0编辑  收藏  举报