日期:2014-05-18  浏览次数:20802 次

哪儿来的空提示框?
有一个文本框,在焦点离开时,判断数据库里是否有这样的数据,如果有,提示信息重复。可是现在是没有重复数据时,也有一个空的信息提示框。还请大侠帮忙看一下,非常感谢!!

代码如下:

<input   name= "nsrsbh "   type= "text "     size=20   maxlength= "20 "   autocomplete= "off "   onKeyDown= "if(event.keyCode==13)       event.keyCode=9 "   onBlur= "aResult(); "   >

<script   language= "JavaScript ">
function   aResult()
        {
var   a   =   new   ActiveXObject( "Microsoft.XMLHTTP ");
a.open( "POST ", "Server.asp?nsrsbh= "+document.all.nsrsbh.value,false);
}
</script>  


nsrsbh   =   unescape(Request( "nsrsbh "))
sql   =   "select   *   from   swdjz   where   (nsrsbh= ' "&nsrsbh& " '   ) "  
rs.Open   sql,conn,1
If   not   rs.eof   then
        response.Write   escape(nsrsbh)&escape( "   相同用户已经存在 ")
end   if

------解决方案--------------------
作asp的怎么跑到java版来问了。

你的返回处理怎么做的?没有看到你弹出提示框的代码
------解决方案--------------------
if rs.bof and rs.eof then


你的逻辑反了
------解决方案--------------------
偶不会帮顶~~~~~~~~
------解决方案--------------------
就这么多代码?不会出现你说的问题的。要不就是你调用的问题。调用了2次。