eaglesjazz
(eaglesjazz)
注册会员

一般会员
UID 16020
精华
0
积分 178
帖子 140
金钱 178 喜悦币
威望 0
人脉 0
阅读权限 20
注册 2002-8-20
状态 离线
|
[广告]: 代充Paypal帐号美元
PHP+Ajax取值的一个问题!
<Script>
//*******************************************************************************
function CreateRequest(){
try{
request = new XMLHttpRequest();
}catch(trymicrosoft){
try{
request = new ActiveXObject("Msxml2.XMLHTTP");
}catch(othermicrosoft){
try{
request = new ActiveXObject("Microsoft.XMLHTTP");
}catch (failed) {
request = false;
}
}
}
}
//*******************************************************************************
function Send(Str){
var strUrl = basePath + _Program + "?tmp=" + Math.random();
SendReq(strUrl,Str);
}
//*******************************************************************************
function SendReq(strUrl,Str){
with(request){
try{
request.open("POST",strUrl,false);
request.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
request.send(Str);
if(request.readyState == 4){
var s = request.responseText;
//alert (s);
eval(s);
}
}
catch(e){
}
}
}
//******************************************************************************
function DoSave(Str){
CreateRequest();
Send(Str);
}
</Script>
<form name='a123'>
<a href='#' onClick="Dosave('abcdef');">666666666666666666</a>
</form>
<?
$Comment_Cent = $_POST['Str'];
echo "setHttpPage(\"$Comment_Cent\",\"$tmp_Date\");";
?>
php里面怎么有取不到Str 这个值呢?
|
|