begin showmessage('帐号有错误,请重新输入'); edt1.text:=''; edt1.setfocus; end//缺少end再一个漏洞:使用Tab键就没有检测是否录入的正确还一个Bug:退格键无法使用