【发布时间】:2017-11-03 19:33:40
【问题描述】:
我有一个问题,如何更改 HTML 输入值?
<select name="sys_lenght" aria-controls="systable" class>
<option value="20">Value 1</option>
<option value="40">Value 2</option>
<option value="80">Value 3</option>
</select>
我用过这段代码
For Each Elementz In WebBrowser1.Document.GetElementsByTagName("select")
If Elementz.Name = "sys_lenght" Then
Elementz.setAttribute("value", "80")
End If
Next
但它不会更改输入值,只会更改文本“Value 3”。 我怎么解决这个问题?谢谢
【问题讨论】: