--
Select Case e.Path
Case "test.htm"
Dim wb As New weui
wb.AddForm("", "form1", "test.htm")
With wb.AddInputGroup("form1", "ipg1", "登录")
.AddInput("xm", "户名", "text").Attribute = "onkeydown=""next(\'pw\')"""
.AddInput("pw", "密码", "text").Attribute = "onkeydown=""next(\'qt\')"""
.AddInput("qt", "其它", "text")
End With
With wb.AddButtonGroup("form1", "btg1", True)
.Add("btn1", "确定", "button").Attribute = "onclick=""submitAjaxForm(\'form1\',\'\',false);"""
.Add("btn5", "主页", "", "http://www.foxtable.com")
End With
wb.AppendHTML("<script src=\'./lib/ajaxform.js\'></script>") \'引入脚本文件
e.WriteString(wb.Build) \'生成网页
End Select
ajaxform.js-------------
function next(id) {
if (event.key === \'Enter\') {
event.preventDefault();
document.getElementById(id).focus();
}
}