
在VF中制作一个如图的登陆界面 确定按钮的代码是什么?
展开全部
下面的例子是假设用户名密码是固定到程序中的
IF EMPTY(thisform.text1.Value)
MESSAGEBOX("请输入用户名",16,"系统提示")
thisform.text1.SetFocus
RETURN
ELSE
IF EMPTY(thisform.text2.Value)
MESSAGEBOX("请输入口令",16,"系统提示")
thisform.text2.SetFocus
RETURN
ELSE
IF ALLTRIM(thisform.text1.Value) == "用户1" .and. ALLTRIM(thisform.text2.Value ) == "用户1的密码"
DO FORM 用户1的表单
ELSE
IF ALLTRIM(thisform.text1.Value) == "用户2" .and. ALLTRIM(thisform.text2.Value ) == "用户2的密码"
DO FORM 用户2的表单
ELSE
MESSAGEBOX("用户名或口令错误",16,"系统提示")
thisform.text2.Value = ''
thisform.text1.SelStart = 0
thisform.text1.SelLength = LEN(thisform.text1.Value)
thisform.text1.SetFocus
ENDIF
ENDIF
ENDIF
ENDIF
IF EMPTY(thisform.text1.Value)
MESSAGEBOX("请输入用户名",16,"系统提示")
thisform.text1.SetFocus
RETURN
ELSE
IF EMPTY(thisform.text2.Value)
MESSAGEBOX("请输入口令",16,"系统提示")
thisform.text2.SetFocus
RETURN
ELSE
IF ALLTRIM(thisform.text1.Value) == "用户1" .and. ALLTRIM(thisform.text2.Value ) == "用户1的密码"
DO FORM 用户1的表单
ELSE
IF ALLTRIM(thisform.text1.Value) == "用户2" .and. ALLTRIM(thisform.text2.Value ) == "用户2的密码"
DO FORM 用户2的表单
ELSE
MESSAGEBOX("用户名或口令错误",16,"系统提示")
thisform.text2.Value = ''
thisform.text1.SelStart = 0
thisform.text1.SelLength = LEN(thisform.text1.Value)
thisform.text1.SetFocus
ENDIF
ENDIF
ENDIF
ENDIF

2024-09-19 广告
随着AI技术的飞速发展,如今市面上涌现了许多实用易操作的AI生成工具1、简介:AiPPT: 这款AI工具智能理解用户输入的主题,提供“AI智能生成”和“导入本地大纲”的选项,生成的PPT内容丰富多样,可自由编辑和添加元素,图表类型包括柱状图...
点击进入详情页
本回答由AiPPT提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询