【已解决】怎样实现在这个GUI窗体里自动填写表单?
本帖最后由 chamlien 于 2014-8-19 20:38 编辑里面的网页源文件是:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>登录</title>
<link rel="stylesheet" type="text/css" href="/prx/000/http/localhost/portal.css">
<script language="JavaScript" src="/prx/000/http/localhost/an_util.js"></script>
<script language="JavaScript">
<!--
if (self != top) {
top.location = self.location;
}
if (_AN_nav_get_cookie(4) == 'open') {
_AN_show_help('login_general');
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0">
<div class="header">
<table class="toptable" valign="top" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="100%" border="0" cellspacing="5" cellpadding="5">
<tr>
<td valign=top><img src="/prx/000/http/localhost/images/lock_logo.gif"></td>
</tr>
</table></td>
<td> </td>
</tr>
<tr>
<td width=90%> </td>
<td width=10% valign=bottom><table cellspacing=0 cellpadding=0><tr>
<td nowrap align=right valign=bottom> <a class="loghelp" href="javascript:_AN_show_help('login_general');">帮助</a> </td>
</tr></table>
</td>
</tr>
<tr>
<td height=5 class="redline"> </td><td class="redline"> </td>
</tr>
</table>
</div>
<div class="spcontent">
<table cellpadding=0 cellspacing=15>
<tr>
<td class="title">登录</td>
</tr>
<tr><td>
<FORM method ="POST" name="login_form" action="/prx/000/http/localhost/login" autocomplete="off">
<table cellspacing=10>
<tr>
<td nowrap align="right" class="usermessage">用户名:</td>
<td><input type="text" name="uname" size="22" maxlength="64" style="width:150" id="setfocus" autocomplete="off"></td>
</tr>
<tr>
<td nowrap align="right" class="usermessage">密码:</td>
<td><input type="password" name="pwd" size="22" maxlength="32" style="width:150" autocomplete="off"></td>
</tr>
<tr>
<td></td>
<td><input type="submit" value="登录"></td>
</tr>
</table>
</form>
</td></tr>
</table>
</div>
</table>
</body>
</html>
<script language="JavaScript">
document.getElementById('setfocus').focus();
</script> 最简单的也是最蹩脚的方法就是模拟鼠键 回复 1# chamlien
经实机测试,非常容易实现~~
信息也很简单,楼主自己试着动手看看~~
附表单信息
【主页面】表单:name="login_form"
提交地址(action):/prx/000/http/localhost/login
<input type="text" name="uname" value="">
<input type="password" name="pwd" value="">
<input type="submit" name="" value="登录"> 回复 4# lcigvkbz
论坛给了你学习自动化的方法,你却用它在论坛发广告… 回复 3# annybaby
我是新手,还不知道怎么写出代码,麻烦大哥了! 回复 5# chamlien
建议搜索论坛相关的表单操作信息~~
页:
[1]