Home > Web Front-end > JS Tutorial > body text

jquery post method passes multiple parameter values ​​and receives them in the form of arrays in the background_jquery

WBOY
Release: 2016-05-16 17:43:48
Original
1169 people have browsed it

When passing multiple values ​​using jquery's post method, the background page can receive

in the form of an array as shown below

Copy the code The code is as follows:



The $.post method does not support passing parameters in the form of arrays, so in the above jquery code, pass it as a string. The aspx page in the background can receive it as an array. Form splitting, the code is as follows
Copy code The code is as follows:

string arr = Request[" arr"].ToString();
string[] myarr = arr.Split(',');
string message = myarr[0];
string name = myarr[1];
string action = myarr[2];
string time = myarr[3];

In this way, the corresponding value can be obtained.
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!