VF的高手来下,关于循环问题
我想在登陆框中实现,用户名或密码输入三次错误会被强制退出,如何我下面的代码中会出现不管正不正确都会被强制退出,请帮我解决下,谢谢
sele pword
if allt(thisform.text2.value)==""
thisform.label3.caption="请输入系统登录用户名!!"
thisform.text2.setfocus
else
thisform.label3.caption=""
if allt(thisform.text1.value)==""
thisform.label2.caption="请输入系统登录密码!!"
thisform.text1.setfocus
else
thisform.label2.caption=""
for n=1 to 3
if allt(姓名)=allt(thisform.text2.value)
if allt(密码)=allt(thisform.text1.value)
thisform.release
do menu.mpr
*clear events
else
thisform.label2.caption="密码错误,请重新输入!"
thisform.text1.value=""
thisform.text1.setfocus
loop
endif
else
thisform.label3.caption="用户名错误,请重新输入!"
thisform.text1.value=""
thisform.text2.value=""
thisform.text2.setfocus
loop
endif
endfor
thisform.text1.enabled=.f.
thisform.text2.enabled=.f.
thisform.command1.enabled=.f.
messagebox("非法使用,程序即将关闭!",0+16,"警告")
thisform.release
quit
endif
endif