谢谢3楼提醒了,倒也是一个取巧的方法,添加2个table,一个显示标题,一个显示内容。参考
Select Case e.Path
Case "table.htm"
Dim wb As New WeUI
wb.AppendHTML("<style>#table2 td{width: 100px;word-break: break-all;}</style>",True)
With wb.AddTable("","Table1")
.ColWidth = "100px,100px,100px,100px,100px" '设置列宽
.head.AddRow("部门","姓名","年龄","电话","地址") '表头
End With
wb.InsertHTML("","<div id='div1' style='overflow-y:auto;height:300px'>")
With wb.AddTable("","Table2")
For i As Integer = 1 To 20
.body.AddRow("技术部","张三","36","110","中国北京") '数据
Next
End With
wb.InsertHTML("","</div>")
e.WriteString(wb.Build)
End Select