httprequest事件
Select Case e.Path
Case "test.htm"
Dim wb As New weui
wb.AddForm("", "form1", "tongji.htm")
With wb.AddInputGroup("form1", "ipg2", "动态赋值")
.AddInput("bm", "部门", "text")
.AddInput("xm", "姓名", "text")
End With
With wb.AddTable("", "Table1")
.head.AddRow("部门", "姓名", "年龄", "电话", "地址") '表头
.body.AddRow("技术部", "张三", "36", "110", "中国北京").Attribute = ""
.body.AddRow("技术部", "李四", "38", "110", "中国上海").Attribute = ""
.body.AddRow("技术部", "王五", "39", "110", "中国深圳").Attribute = ""
.body.AddRow("生产部", "赵六", "39", "110", "中国深圳").Attribute = ""
.body.AddRow("生产部", "刘七", "39", "110", "中国深圳").Attribute = ""
End With
wb.AppendHTML("<script src='./lib/ajaxform.js'></script>") '引入脚本文件
e.WriteString(wb.Build)
End Select
js文件
function setvalues(){
document.getElementById("bm").value = table1.rows[table1.rowSel].cells[0].innerHTML;
document.getElementById("xm").value = table1.rows[table1.rowSel].cells[1].innerHTML;
}