Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.net Vb10如何将文本框复制到webbrowser登录页?_.net_Vb.net - Fatal编程技术网

.net Vb10如何将文本框复制到webbrowser登录页?

.net Vb10如何将文本框复制到webbrowser登录页?,.net,vb.net,.net,Vb.net,我想创建一个应用程序登录到一个网站 如何在webbrowser中将文本框中的文本复制到登录表单中 <input name="yesID" type="text" class="textbox" style="width:260px;color:grey;"> <input name="password" type="password" maxlength="16" class="textbox" style="width:260px;" onkeypress="

我想创建一个应用程序登录到一个网站

如何在webbrowser中将文本框中的文本复制到登录表单中

<input name="yesID" type="text" class="textbox" style="width:260px;color:grey;">
<input name="password" type="password" maxlength="16" class="textbox" 
       style="width:260px;" onkeypress="return submitenter(this,event)">
<a class="redButtonLG" onclick="javascript:return 
    onSubmit(document.getElementById('loginFormId'), 'doLoginCareConfirmation');">
      <img src="docroot/images/postpaidXpress/btn_login.png">
</a>

例如: 用于标识的txtID.text, txtPassword.text作为密码, 请输入该按钮的cmdEnter。

再试一次

WebBrowser1.Document.GetElementById("yesID").InnerText = txtID.text

出现了一个错误。这是我的代码:Private Sub cmdCheck_Click(ByVal sender As System.Object,ByVal e As System.EventArgs)处理cmdCheck。单击WebBrowser1.Navigate(“)WebBrowser1.Document.GetElementById(“yesID”)。InnerText=txtID.Text WebBrowser1.Document.GetElementById(“密码”)。InnerText=txtPwd.Text WebBrowser1.Document.All(“Submit”).RaiseEvent(“onclick”)End Sub消息是什么,在哪一行?WebBrowser1.Document.GetElementById(“yesID”).InnerText=txtID.Text NullReferenceException未处理。对象引用未设置为对象的实例。没有“Submit”按钮。这是链接(…)中的图像。您无法引发事件,因为元素“Submit”“不存在。我不知道如何在没有html ID的情况下单击链接。我忽略了关于单击事件。我尝试使用WebBrowser1.Document.GetElementById(“yesID”)。InnerText=txtID.Text,但我文本框中的文本不会将其复制到webbrowser。”