asp ajax查询问题

来源:百度知道 编辑:UC知道 时间:2024/05/14 10:06:14
求高手给写个例子啊 就是输入文本框值以后点击按钮 显示是否被注册
要求<script>部分
<form>部分
还有后台部分
谢谢了!

太多了,给你个思路,你自己研究吧

前台:
<script type="text/javascript">
<!--
var xmlHttp;
function createXMLHttpRequest()
{
if(window.ActiveXObject)
{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
else if(window.XMLHttpRequest)
{
xmlHttp=new XMLHttpRequest();
}
}
function startRequest(url)
{
createXMLHttpRequest();
xmlHttp.onreadystatechange=handleStateChange;
xmlHttp.open("POST",url,true);
xmlHttp.send();
}

function handleStateChange()
{
if(xmlHttp.readyState==4)
{
if(xmlHttp.status==200)
{
document.getElementById("results").innerHTML=xmlHttp.responseText;
}
}

}
function check()
{
var Month=document.getElementById("Month").va