新人求教

WBOY
Release: 2016-06-23 13:41:30
Original
880 people have browsed it

<script type="text/javascript"></script><script>	function chuli(XB){		document.getElementById(XB).value ="1";		var ajax=new Ajax();		ajax.post('ChuLi.php','zuobiao=XB');		alert(XB);				}
Copy after login



在ChuLi.php中的

$a=fopen("hehe.txt","a+");$b=$_POST['zuobiao'];fwrite($a,$b);fclose($a);
Copy after login


弹出的框的值是
在hehe.txt中传递的值是


为什么XB的值没传递过去啊  求教啊



回复讨论(解决方案)

ajax.post('ChuLi.php','zuobiao=XB');
改?
ajax.post('ChuLi.php','zuobiao='+XB);

ajax.post('ChuLi.php','zuobiao= XB');
在引号中的,不就是字符吗?



谢谢   看样子 还得去  看下 基础的................

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