Home  >  Article  >  Backend Development  >  关于PHP怎么获取AJAX值的有关问题。

关于PHP怎么获取AJAX值的有关问题。

WBOY
WBOYOriginal
2016-06-13 11:48:37919browse

关于PHP如何获取AJAX值的问题。。。。。。。。。。
现在有以下问题
1,在test.php页面有一个
        
        
        
        



然后在这个页面还有一个变量 $arr

现在我想要把option的值赋给$arr,并且是option每次改变的时候,改变$arr的值。
然后我用了AJAX,传回了json值,每次改变option的时候,值分别是10,20,30
我的问题就是,如何把AJAX的值传给$arr。
------解决方案--------------------
ajax要修改主界面上的某个值,可以用js把页面上那个值改掉
反正ajax也是js执行的,直接在回调函数中加语句就行
具体做法加个div或span设个id,再写一条js语句
要改的值很多的话干脆把整块页面内容替换掉。

Statement:
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
Previous article:大神啊求帮助,多谢了!Next article:AJAX PHP 循环之后点击状态更换图片,该如何解决

Related articles

See more