About how PHP gets AJAX values.

Source: Internet
Author: User
The question about how PHP can obtain AJAX values .......... Now you have the following question 1. the php page has a & lt; select & gt;, as shown below & lt; div & gt; test: & nbsp; & nbsp; & lt; select & nbsp; id = "top questions about how PHP gets AJAX values ..........
The following problems exist:
1. there is , The following test: 10 20 30


Then there is a variable $ arr on this page.

Now I want to assign the option value to $ arr, and change the value of $ arr every time the option is changed.
Then I used AJAX to return the json value. each time the option is changed, the values are 10, 20, 30, respectively.
My question is how to pass the AJAX value to $ arr.
------ Solution --------------------
To modify a value on the main interface of ajax, you can use js to change the value on the page.
Ajax is executed by js. you can simply add a statement to the callback function.
Add a div or span to set an id, and then write a js statement.
If you want to change a lot of values, simply replace the content of the entire page.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.