填写出生日期日期以后生成年龄?
Select Case e.Path
Case "test.htm",""
Dim wb As New WeUI
wb.AddForm("","form1","addnew.htm")
With wb.AddInputGroup("form1","ipg1","客户资料")
.AddInput("姓名","姓名","Text") '前一个"姓名"是ID,后一个"姓名"是标题
.AddInput("日期","日期","date").attribute = "onchange=""var r = this.value.match(/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2})$/);if(r==null) return;var d= new Date(r[1], r[3]-1, r[4]); if(d.getFullYear()==r[1]&&(d.getMonth()+1)==r[3]&&d.getDate()==r[4]){ var Y = new Date().getFullYear(); 年龄.value = Y-r[1];}"""
.AddInput("年龄","年龄","number")
End With
With wb.AddButtonGroup("form1","btg1",True)
.Add("btn1", "确定", "submit")
End With
e.WriteString(wb.Build)
End Select