asp+access+ajax显示不出提示信息,求指教。。。。
第一个页面user.asp
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style>
.aa{ visibility:}
</style>
</head>
<script language="javascript" type="text/javascript">
var xmlHttp;
function creatXMLHttpRequest()
{
try
{
// Firefox, Opera 8.0+, Safari
xmlHttp=new XMLHttpRequest();
}
catch (e)
{
// Internet Explorer
try
{
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e)
{
alert("您的浏览器不支持AJAX!");
return false;
}
}
}
}
function staratrequest()
{
var str=document.getElementById("username").value;
var url="ajaxuser.asp?times="+encodeURI(str)+"&aa="+new Date().getTime();
creatXMLHttpRequest();
xmlHttp.onreadystatechange=handstartchange;
xmlHttp.open("get",url,true);
xmlHttp.send(null);
}
function handstartchange()
{
var div1=document.getElementById("divuser");
var bot=document.getElementById("button");
if(xmlHttp.readyState==4)
{
if(xmlHttp.status==200)
{
if(xmlHttp.responseText=="nono"){
div1.innerHTML="<img src='images/error.jpg' width='16' height='18' />用户名不能为空!" ;
bot.disabled=true;
return false;
}
else
{
if(xmlHttp.responseText=="no")
{
div1.innerHTML="<img src='images/error.jpg' width='16' height='18' />用户名已经被占用!" ;
bot.disabled=true;
return false;
}
else
{
div1.innerHTML="<img src='images/right.jpg' width='16' height='18' />用户可以注册!" ;
return true;
}
}
}
}
}
function fous()
{
var div1=document.getElementById("divuser");
div1.innerHTML="" ;
document.getElementById("button").disabled=false;
}
</script>
<body>
<form name="form1" action="insert.asp" method="post">
<table width="463" border="1">
<tr>
<td width="80">用户名</td>
<td width="168"><label>
<input type="text" name="username" id="userna