- username = "gds"
- password = "123"
- Dim IE,er
- Set IE = CreateObject("InternetExplorer.Application")
- IE.Navigate "http://192.168.255.243/"
- IE.Visible = True
- Do Until IE.ReadyState = 4
- WScript.Sleep 1000
- Loop
- IE.Document.getElementById("DDDDD").innerText = username
- IE.Document.getElementById("upass").innerText = password
- IE.Document.getElementById("0MKKey").submit
复制代码 下面是网页代码:
<html><head>
<script language="JavaScript"><!--
sv=0;sv1=0;v6='http://[::]:9002/v6 ';myv6ip=' ';
if(sv==1&&sv1==0)window.location=v6;
function mysubmit(){if(sv1==1)document.form1.v6ip.value=myv6ip;return true;}
// --></script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>网关登陆 </title>
<style><!--
a {text-decoration: none}
.f1 { font-size: 9pt; font-family: Verdana; line-height: 14pt }
.f2 { font-size: 8pt; font-family: Verdana; line-height: 12pt }
-->
</style></head><body><form name=form1 method=post action="/" onSubmit="return mysubmit()">
<center>
<table width=600 border=0 height=80%>
<tr>
<td height=100%>
<div align=center>
<center>
<table width=350 border=0 height=397 bgcolor=#FFFFFF cellspacing=0 cellpadding=0 style="border-collapse: collapse" bordercolor=#111111>
<tr>
<td height=60 width=350 colspan=2>
<p align=center>
<img border=0 src=4.gif width=350 height=44></td>
</tr>
<tr>
<td height=70 width=350 colspan=2>
<div align=center><font ; font color=000000> </font></div>
<div align=center style="width: 352; height: 20"><font ; font color=000000></font></div></td></tr>
<tr>
<td height=28 width=350 class=f1 align=right colspan=2 bgcolor=#94A9BE>
<p align=center class=f1><font color=#FFFFFF>请输入您的帐号和密码</font></td>
</tr>
<tr>
<td height=65 width=163 class=f1 align=right bgcolor=#D3DCE4>帐号 Account :</td>
<td height=65 width=187 class=f1 bgcolor=#D3DCE4>
<p> <input name=DDDDD size=16 maxlength=26 style=" BACKGROUND-COLOR: rgb(255,255,255); BORDER-BOTTOM: rgb(0,0,0) 1px solid; BORDER-LEFT: rgb(0,0,0) 1px solid; BORDER-RIGHT: rgb(0,0,0) 1px solid; BORDER-TOP: rgb(0,0,0) 1px solid"></p>
</td>
</tr>
<tr>
<td height=15 width=163 class=f1 align=right bgcolor=#D3DCE4>密码 Password :</td>
<td height=15 width=187 class=f1 bgcolor=#D3DCE4>
<p> <input type=password name=upass size=16 maxlength=16 style=" BACKGROUND-COLOR: rgb(255,255,255); BORDER-BOTTOM: rgb(0,0,0) 1px solid; BORDER-LEFT: rgb(0,0,0) 1px solid; BORDER-RIGHT: rgb(0,0,0) 1px solid; BORDER-TOP: rgb(0,0,0) 1px solid"></p>
</td>
</tr>
<tr>
<td height=70 width=350 colspan=2 bgcolor=#D3DCE4><p align=center>
<input type=submit name=0MKKey value="登录 Login" style=" BACKGROUND-COLOR: rgb(105,130,150); BORDER-BOTTOM: rgb(100,130,160) 1px solid; BORDER-LEFT: rgb(139,141,218) 1px solid; BORDER-RIGHT: rgb(23,24,79) 1px solid; BORDER-TOP: rgb(194,217,227) 1px solid; COLOR: rgb(255,255,255); font-size: 9pt; font-family: Verdana; height: 25; width: 85">
<input type=reset name=1MKKey value="重置 Reset" style=" BACKGROUND-COLOR: rgb(105,130,150); BORDER-BOTTOM: rgb(23,24,79) 1px solid; BORDER-LEFT: rgb(139,141,218) 1px solid; BORDER-RIGHT: rgb(23,24,79) 1px solid; BORDER-TOP: rgb(194,217,227) 1px solid; COLOR: rgb(255,255,255); font-size: 9pt; font-family: Verdana; height: 25; width: 85"></td>
<input type="hidden" name="v6ip" value="">
</tr>
<tr>
<td height=28 width=350 colspan=2 bgcolor=#94A9BE>
<p class=f1 align=center><a href=9.htm><font color=#FFFFFF>修改密码 Edit Pass</font></a></td>
</tr>
<tr>
<td height=51 width=350 bgcolor=#D3DCE4 colspan=2>
<p align=center class=f2><font size=1><br>
</font>© 2003 <a target=_blank href=http://www.doctorcom.com>CITY HOTSPOT</a>. All Rights Reserved. </td></tr>
</table></center></div></td></tr></table></center></form></body></html>f2o_demo1").innerHTML;
我怎么运行都不行,老是在最后一行报错——对象不支持此属性或方法。
请大家帮我指点指点,谢谢啦! |