首页 > 代码库 > axWebrower 如何 输入 内容并提交

axWebrower 如何 输入 内容并提交

 mshtml.IHTMLDocument2 doc2 = (mshtml.IHTMLDocument2)axWebBrowser1.Document;
                mshtml.IHTMLElementCollection inputs;
                inputs = (mshtml.IHTMLElementCollection)doc2.all.tags("INPUT");
                mshtml.IHTMLElement element = (mshtml.IHTMLElement)inputs.item("j_username", 0);
                mshtml.IHTMLInputElement inputElement = (mshtml.IHTMLInputElement)element;
                //用户名1/密码1
                inputElement.value = http://www.mamicode.com/"用户名1";
                element = (mshtml.IHTMLElement)inputs.item("j_password", 0);
                inputElement = (mshtml.IHTMLInputElement)element;
                inputElement.value = "密码1";
                element = (mshtml.IHTMLElement)inputs.item("imageField", 0);
                element.click();

axWebrower 如何 输入 内容并提交 So Easy !  Mark ,省得自己找不着。

mshtml 找不到? 私我。这货真心不好找。

axWebrower 如何 输入 内容并提交