Dim web As System.Windows.Forms.WebBrowser = e.Form.Controls("webbrowser1").basecontrol
Dim Doc = web.Document.Window.Frames("frm1").Document
Dim trs = Doc.GetElementsByTagName("tr")
For Each tr As object In trs
Dim id As String = tr.getAttribute("id")
If id > "" AndAlso id Like "tr*"
Dim idx As Integer = val(id.SubString(2))
Dim ip1 = Doc.GetElementsByid("oldcjbzdm" & idx)
Dim xhw As String = ip1.Parent.innerText
msgbox("学号:" & xhw)
Dim dr As DataRow = DataTables("成绩表").Find("学号 = '" & xhw & "'")
If dr IsNot Nothing Then
Dim ip2 = Doc.GetElementsByid("cj" & idx & "|0")
msgbox("平时成绩:" & ip2.GetAttribute("value"))
ip2.SetAttribute("value", dr("平时成绩"))
End If
End If
Next