js传值到php,不能接收到值 5
functionload_point(q){alert(q);//ChangethisdependingonthenameofyourPHPfiledownloadUrl...
function load_point(q) {
alert(q);
// Change this depending on the name of your PHP file
downloadUrl("phpsqlajax_genxml2.php?q="+q, function(data) {
......
});
}
function downloadUrl(url, callback) {
var request = window.ActiveXObject ?
new ActiveXObject('Microsoft.XMLHTTP') :
new XMLHttpRequest;
request.onreadystatechange = function() {
if (request.readyState == 4) {
request.onreadystatechange = doNothing;
callback(request, request.status);
}
};
request.open('GET', url, true);
request.send(null);
}
下面是phpsqlajax_genxml2.php文件
<?php
$q=$_GET["q"];
echo $q;
?>
php文件当中不能接收参数q 不知道什么原因
js中alert(q);能打印q值
http://bbs.csdn.net/topics/390937188?page=1#post-398561277 展开
alert(q);
// Change this depending on the name of your PHP file
downloadUrl("phpsqlajax_genxml2.php?q="+q, function(data) {
......
});
}
function downloadUrl(url, callback) {
var request = window.ActiveXObject ?
new ActiveXObject('Microsoft.XMLHTTP') :
new XMLHttpRequest;
request.onreadystatechange = function() {
if (request.readyState == 4) {
request.onreadystatechange = doNothing;
callback(request, request.status);
}
};
request.open('GET', url, true);
request.send(null);
}
下面是phpsqlajax_genxml2.php文件
<?php
$q=$_GET["q"];
echo $q;
?>
php文件当中不能接收参数q 不知道什么原因
js中alert(q);能打印q值
http://bbs.csdn.net/topics/390937188?page=1#post-398561277 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询