c# 点击webBrowser里面网页按钮的实现
用这段代码实现不了点击网页按钮的操作:HtmlElementcmd=webBrowser1.Document.GetElementById("pr");mshtml.HT...
用这段代码实现不了点击网页按钮的操作 :HtmlElement cmd = webBrowser1.Document.GetElementById("pr");
mshtml.HTMLDivElementClass qding = (mshtml.HTMLDivElementClass)(cmd.DomElement);
qding.click();
谢谢各位大虾帮看看!~要实现点击webBrowser网页按钮该如何实现呢?
急啊!~~~~~~~~在此先说谢谢了!~ 展开
mshtml.HTMLDivElementClass qding = (mshtml.HTMLDivElementClass)(cmd.DomElement);
qding.click();
谢谢各位大虾帮看看!~要实现点击webBrowser网页按钮该如何实现呢?
急啊!~~~~~~~~在此先说谢谢了!~ 展开
展开全部
HtmlDocument htmlDoc = webBrowser1.Document;
HtmlElement cmd = htmlDoc.GetElementById("pr");
mshtml.HTMLDivElementClass qding = (mshtml.HTMLDivElementClass)(cmd.DomElement);
if (qding != null)
{
qding.InvokeMember("Click");
}
HtmlElement cmd = htmlDoc.GetElementById("pr");
mshtml.HTMLDivElementClass qding = (mshtml.HTMLDivElementClass)(cmd.DomElement);
if (qding != null)
{
qding.InvokeMember("Click");
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询