日期:2014-05-18 浏览次数:21273 次
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load WebBrowser1.Url = New Uri("https://ebs.boc.cn/BocnetClient/PreLogin.do?_locale=zh_CN") End Sub Dim b As Boolean = False Private Sub WebBrowser1_DocumentCompleted(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted Try Dim tbUserid As HtmlElement = WebBrowser1.Document.All("LoginName") Dim tbvalida As HtmlElement = WebBrowser1.Document.All("ValidationChar") Dim tbPasswd As HtmlElement = WebBrowser1.Document.All("pass") tbUserid.SetAttribute("value", "帐号") tbvalida.SetAttribute("value", "验证码") '只是测试,俺也不会识别验证码 tbPasswd.SetAttribute("value", "密码") '提示参数数目与需要的数据不符 Catch ex As Exception MessageBox.Show(ex.Message) End Try End Sub
<tr> <td> </td> <td height="30" class="input_font">用 户 名:</td> <td valign="bottom"><input type="text" name="LoginName" class="login" maxlength="20" /></td> <td rowspan="2" align="left" valign="top" class="input_font2">用户名和密码对大小写字母敏感,请注意区分</td> </tr> <tr> <td> </td> <td height="30" class="input_font">密 码:</td> <td> <div id="passobject" class="login"> <script language="JavaScript"> passr = CreateControl("passobject", "document.form1", "pass", "0", "zh_CN"); </script> </div> </td> </tr>