用隐藏的IFRAME
<form method=post action='check.php' target='checkiframe'.
<input type=text name='name'>
<input type=password name='pwd'>
<input type=submit name=submit value='提交'>
</form>
<iframe width=0 height=0 src='blank'>
</iframe>
然后再check.php中做校验,用js alert结果

解决方案 »

  1.   

    可是我不懂PHP啊,能不能写具体点,最好是完整的代码.
      

  2.   

    晕。原理是一样的啊
    用ASP也是一样做的啊
    连接数据库, 
    Dim conn = server.CreateObject........我不会ASPset rs=Server.CreateObject("adodb.recordset")
    sql = "select id from user where name='"&request.form("name")&"' and pwd = '"&request.form("pwd")&"'";
    rs.open .........
    然后判断结果啊,
    If not rs.eof then
     response.write("<script>alert('通过验证')</script>");
    else
     response.write("<script>alert('没有通过验证')</script>");
      

  3.   

    谢谢各位,特别感谢ice_berg16(寻梦的稻草人) .