关于跳转的一个问题

wang_20151 2015-01-22 12:31:10

<html>
<head>
<script type="text/javascript" >
var xmlhttp;
function xmlhttprequest(){

if(window.ActiveXObject){
xmlhttp = new ActiveXObject('Microsoft.XMLHTTP')
}else if(window.XMLHttpRequest){
xmlhttp=new XMLHttpRequest()
}


}

function readychange(){
if((xmlhttp.readyState == 4) && (xmlhttp.status==200)){

document.getElementById("prompt").innerHTML=xmlhttp.responseText

}
else alert("error");
}

function funtest(x){
var f=document.getElementById(x).value;
xmlhttprequest()
alert(xmlhttp)
alert(f)

xmlhttp.open("GET","http://localhost/Login.php/process.php?name="+f,true)
xmlhttp.onreadystatechange=readychange
alert("success")
xmlHttp.send();

}

</script>
</head>
<body>
<p><input type="text" id="fname" name="name" onblur="funtest(this.id)" /></p>
<p><input type="password" name="password" /></p>
<p id="prompt"></p>
</body>
</html>
...全文
108 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
wang_20151 2015-01-22
  • 打赏
  • 举报
回复
<?php $name=$_GET['name']; echo $name; ?> 这个是process.php的文件,但是测试的时间发现根本没有跳转到这个php文件中,本人菜鸟,求大神解答
slwsss 2015-01-22
  • 打赏
  • 举报
回复
xmlhttp.open("GET","http://localhost/Login.php/process.php?name="+f,true) xmlhttp.onreadystatechange=readychange alert("success") xmlhttp.send();

87,923

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧