Acme.BookStore.HttpApi.Host/node_modules/jquery-form/README.md
(开头部分) 11KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
# jQuery Form [](https://travis-ci.org/jquery-form/form)
## Overview
The jQuery Form Plugin allows you to easily and unobtrusively upgrade HTML forms to use AJAX. The main methods, ajaxForm and ajaxSubmit, gather information from the form element to determine how to manage the submit process. Both of these methods support numerous options which allow you to have full control over how the data is submitted.
No special markup is needed, just a normal form. Submitting a form with AJAX doesn't get any easier than this!
## Community
Want to contribute to jQuery Form? Awesome! See [CONTRIBUTING](CONTRIBUTING.md) for more information.
### Code of Conduct
Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md) to ensure that this project is a welcoming place for **everyone** to contribute to. By participating in this project you agree to abide by its terms.
### Pull Requests Needed
#### Enhancements needed to to be fully compatible with jQuery 3
jQuery 3 is removing a lot of features that have been deprecated for a long time. Some of these are still in use by jQuery Form.
Pull requests and assistance in updating jQuery Form to be compatible with jQuery 3 are greatly appreciated.
See [issue #544](https://github.com/jquery-form/form/issues/544) for more information.
## Compatibility
* Requires jQuery 1.7.2 or later.
* Compatible with jQuery 2.
* Partially compatible with jQuery 3.
* **Not** compatible with jQuery 3 Slim. ([issue #544](https://github.com/jquery-form/form/issues/544))
## Download
* **Development:** [src/jquery.form.js
](https://github.com/jquery-form/form/blob/master/src/jquery.form.js)
* **Production/Minified:** [dist/jquery.form.min.js
](https://github.com/jquery-form/form/blob/master/dist/jquery.form.min.js)
### CDN
```html
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.form/4.2.2/jquery.form.min.js" integrity="sha384-FzT3vTVGXqf7wRfy8k4BiyzvbNfeYjK+frTVqZeNDFl8woCbF0CYG6g2fMEFFo/i" crossorigin="anonymous"></script>
```
or
```html
<script src="https://cdn.jsdelivr.net/gh/jquery-form/form@4.2.2/dist/jquery.form.min.js" integrity="sha384-FzT3vTVGXqf7wRfy8k4BiyzvbNfeYjK+frTVqZeNDFl8woCbF0CYG6g2fMEFFo/i" crossorigin="anonymous"></script>
```
---
## API
### jqXHR
The jqXHR object is stored in element <em>data</em>-cache with the <code>jqxhr</code> key after each <code>ajaxSubmit</code>
call. It can be accessed like this:
````javascript
var form = $('#myForm').ajaxSubmit({ /* options */ });
var xhr = form.data('jqxhr');
xhr.done(function() {
...
});
````
### ajaxForm( options )
Prepares a form to be submitted via AJAX by adding all of the necessary event listeners. It does **not** submit the form. Use `ajaxForm` in your document's `ready` function to prepare existing forms for AJAX submission, or with the `delegation` option to handle forms not yet added to the DOM.
Use ajaxForm when you want the plugin to manage all the event binding for you.
后面还有 201 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
