This article covers PHP serialize serialized data and JSON formatted data analysis. For more information, see
This article covers PHP serialize serialized data and JSON formatted data analysis. For more information, see
PHP serialize
The content of this article is PHP serialize serialized data and JSON formatted data analysis. if you need it, refer to PHP serialize to serialize variables, return a string expression with variable types and structures, while JSON is a lighter and
The content of this article is PHP serialize serialized data and JSON formatted data analysis. if you need it, refer to PHP serialize to serialize variables, return a string expression with variable types and structures, while JSON is a lighter and
The form form has a serialize () method. The ability to serialize the values of the form, but this method of jquery provides a way to serialize the data into a form similar to the following:A=1&b=2&c=3&d=4jquery does not provide a way to serialize
JQuery serialize () serializeArray (), jquery form serialization
1. serialize () method
Format: var data = $ ("form"). serialize ();
Function: serialize the form content into a string.
In this way, when submitting form data through ajax, you do not
$.post, $.get is a simple method, if you want to deal with complex logic, still need to use the Jquery.ajax ()I. General format of $.ajax$.ajax ({Type: ' POST ',URL: URL ,Data: data ,Success: Success ,DataType: dataType});Second, the parameter
In jquery Ajax, data is sent to the server in the form of a key-value pair (Key/value), which can be serialized as a key-value pair using the jquery Ajax Serialize () method form when submitting form data using AJAX (key1=value1&key2= Value2 ... )
In jquery, we can directly use serialize () to convert ajax submitted forms. In this way, the input in the form name is converted to the get method. If we have a large number of parameters, we do not need to fill them out.
Data in jQuery ajax is
1.serialize () methodFormat: var data = $ ("form"). Serialize ();Function: Serializes the contents of the form into a single string.This way, when Ajax submits the form data, it is not necessary to enumerate each parameter. Simply set the data
The serialize () serialization of jquery is a simple introduction:In jquery, when using Ajax, it is often necessary to assemble input data to be sent to the server in the form of a key-value pair (key/value).The Serialize method can do this easily,
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.