SourceCode/jiouosdp/Scripts/jquery.form.js

(开头部分) 32KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

/*
 * jQuery form plugin
 * @requires jQuery v1.1 or later
 *
 * Examples at: http://malsup.com/jquery/form/
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 *
 * Revision: $Id$
 * Version: 1.0.3
 */
 (function ($) {
     /**
     * ajaxSubmit() provides a mechanism for submitting an HTML form using AJAX.
     *
     * ajaxSubmit accepts a single argument which can be either a success callback function
     * or an options Object.  If a function is provided it will be invoked upon successful
     * completion of the submit and will be passed the response from the server.
     * If an options Object is provided, the following attributes are supported:
     *
     *  target:   Identifies the element(s) in the page to be updated with the server response.
     *            This value may be specified as a jQuery selection string, a jQuery object,
     *            or a DOM element.
     *            default value: null
     *
     *  url:      URL to which the form data will be submitted.
     *            default value: value of form's 'action' attribute
     *
     *  type:     The method in which the form data should be submitted, 'GET' or 'POST'.
     *            default value: value of form's 'method' attribute (or 'GET' if none found)
     *
     *  beforeSubmit:  Callback method to be invoked before the form is submitted.
     *            default value: null
     *
     *  success:  Callback method to be invoked after the form has been successfully submitted
     *            and the response has been returned from the server
     *            default value: null
     *
     *  dataType: Expected dataType of the response.  One of: null, 'xml', 'script', or 'json'
     *            default value: null
     *
     *  semantic: Boolean flag indicating whether data must be submitted in semantic order (slower).
     *            default value: false
     *
     *  resetForm: Boolean flag indicating whether the form should be reset if the submit is successful
     *
     *  clearForm: Boolean flag indicating whether the form should be cleared if the submit is successful
     *
     *
     * The 'beforeSubmit' callback can be provided as a hook for running pre-submit logic or for
     * validating the form data.  If the 'beforeSubmit' callback returns false then the form will
     * not be submitted. The 'beforeSubmit' callback is invoked with three arguments: the form data
     * in array format, the jQuery object, and the options object passed into ajaxSubmit.
     * The form data array takes the following form:
     *
     *     [ { name: 'username', value: 'jresig' }, { name: 'password', value: 'secret' } ]
     *
     * If a 'success' callback method is provided it is invoked after the response has been returned
     * from the server.  It is passed the responseText or responseXML value (depending on dataType).
后面还有 748 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。