110,571
社区成员
发帖
与我相关
我的任务
分享
<INPUT id=abc type=file>
<INPUT id=abc type=file value=abc>
<INPUT id=abc type=file>
<html>
<body>
<input type="button" id="btnClose" value="关闭" />
</body>
</html>
HtmlDocument htmlDoc = webBrowser.Document;
HtmlElement btnElement = htmlDoc.All["btnClose"];
HtmlElement tbUserid = webBrowser.Document.All["username"];
HtmlElement tbPasswd = webBrowser.Document.All["password"];
if (tbUserid == null || tbPasswd == null || btnSubmit == null)
return;
tbUserid.SetAttribute("value", "smalldust");
tbPasswd.SetAttribute("value", "12345678");
<INPUT id=abc type=file>
HtmlElement value=webBrowser1.Document.CreateElement("value");
value.InnerText = "";
webBrowser1.Document.GetElementById("abc").AppendChild(value);