冯雅伦 发表于 2012-8-16 13:28
我想做一个类似用户注册的页面,在注册时检验用户名是否重复。想在textbox失去焦点是对进行检查,发现好 ...
<script language= "javascript ">
var arr1=new Array()//定义数组,存放UID
function checkUid(regUid)///检查用户名
{
for(var i=0;i <=arr1.length();i++)
{
if(arr1=regUid)
{
alert( "该网站已经存在此用户名! ");
return false;
}
}
}
</script>
<%
set rs=conn.execute ( "select * from person ")
dim i
i=0
do while not rs.eof
response.write( " <script> arr1[ "&i& "]= ' "&rs( "UID ")& " '; </script> ") '把UID存放到arr1数组
rs.movenext
loop
%> |