s did=1
//请吧上面的Id设成最底部布局控件的id
sran(1000000,9999999,密码)
ss 密码=密码
//随机验证码
//输入最低部布局控件的id
nvw(100,did,"相对布局", "width=-1
height=-1
background=#ffffffff")
//创建布局控件
nvw(101, 100, "文本", "width=-2
height=-2
text=请输入验证码:
ut_above=102
ut_centerHorizontal=true
textsize=22sp
textcolor=#ff020202")
nvw(102, 100, "编辑框", "width=-1
height=-2
text=
hint=验证码
ut_centerInParent=true
layout_margin=20dp")
nvw(103, 100, "按钮", "width=-2
height=-2
text=确定
ut_below=102
ut_centerHorizontal=true
textsize=19sp
textcolor=#ff020202")
//创建其他控件
ss("(html)
请输入验证码="red">"+ss.密码+"来进入软件
",t)
us(101,"text",t)
//随机验证码
ssj(103,"clicki")
{
ug(102,"text",输入)
syso(ss.密码)
syso(输入)
f(输入==ss.密码)
{
urvw(100)
}
else
{
utw(null,"提示","验证码错误,请重试!","确定",false,v)
{
endutw()
}
sran(1000000,9999999,密码)
ss 密码=密码
ss("(html)
请输入验证码="red">"+ss.密码+"来进入软件
",t)
us(101,"text",t)
//重新随机验证码
}
}
//定义按钮触屏事件
.作者:wsdx233
欢迎加入AIDE教程网官方交流群:758110864