您的位置:首页 > Web前端 > JQuery

jquery提交ajax Form(未完成)

2015-12-29 12:39 591 查看
ajaxSubmit 和ajaxForm区别

官方解释

What is the difference between ajaxForm and ajaxSubmit?

There are two main differences between these methods:

ajaxSubmit submits the form, ajaxForm does not. When you invoke ajaxSubmit it immediately serializes the form data and sends it to the server. When you invoke ajaxForm it adds the necessary event listeners to the form so that it can detect when the form
is submitted by the user. When this occurs ajaxSubmit is called for you.

When using ajaxForm the submitted data will include the name and value of the submitting element (or its click coordinates if the submitting element is an image).

ajaxForm不能提交表单。在document的ready函数中,使用ajaxForm来为AJAX提交表单进行准备。提交动作必须由submit开始

ajaxSubmit 马上由AJAX来提交表单。你可以在任何情况下进行该项提交。

如果有乱码,加以下代码

contentType: "application/x-www-form-urlencoded; charset=utf-8"
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: