找回密码
 加入
搜索
查看: 4053|回复: 17

[已解决]高手帮忙IE 表单—————谢谢

[复制链接]
发表于 2009-6-21 08:50:43 | 显示全部楼层 |阅读模式
本帖最后由 dgmax 于 2009-6-21 14:31 编辑

以下源码真的没有表单吗??我用表单检查工具找不到。请高手支招。3Q
------------
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>运维生产管理系统</title>
<style type="text/css">
*
{
        margin:0;
        padding:0;
        font-size:12px;
}
body { background:#fff url(images/login_bg.jpg) repeat-x; }
.login
{
        background:url(images/login_03.jpg) no-repeat;
        height:108px;
}
.login input
{
        background:none;
        border:none;
        border-bottom:1px solid;
}
.login #LoginButton
{
        border:none;
        background:url(images/login_05.gif);
        width:49px;
        height:29px;
        cursor:pointer;
}
</style>
<script type="text/javascript" src="js/ext.js"></script>
<script type="text/javascript" src="js/login.js?version=2"></script>
</head>
<body>
<table width="1000" border="0" cellspacing="0" cellpadding="0" align="center">
    <tr>
        <td><img src="images/login_01.jpg" /></td>
    </tr>
    <tr>
        <td><img src="images/login_02.jpg" /></td>
    </tr>
    <tr>
        <td valign="top" class="login"><table width="100%" height="68" border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td width="4%" height="55">&nbsp;</td>
                    <td width="5%">用户名&nbsp;</td>
                    <td width="14%"><input type="text" name="sAccount" id="sAccount" /></td>
                    <td width="5%">密  码&nbsp;</td>
                    <td width="14%"><input type="password" name="sPasswd" id="sPasswd" /></td>
                    <td width="54%"><input type="button" name="LoginButton" id="LoginButton" value="&nbsp;" /></td>
                </tr>
            </table></td>
    </tr>
</table>
</body>
</html>
发表于 2009-6-21 09:35:04 | 显示全部楼层
<input type="text" name="sAccount" id="sAccount"
<td width="14%"><input type="password" name="sPasswd" id="sPasswd" /></td>
                    <td width="54%"><input type="button" name="LoginButton" id="LoginButton" value
发表于 2009-6-21 09:36:45 | 显示全部楼层
_IEGetObjById
_IEGetObjByName
 楼主| 发表于 2009-6-21 11:43:06 | 显示全部楼层
$oForm = _IEFormGetObjByName($oIE, "填什么")
$oQuery =_IEFormElementGetObjByName ($oForm, "填什么")
_IEFormElementSetValue ($oQuery, "张三")
$oQuery =_IEFormElementGetObjByName ($oForm, "填什么")
_IEFormElementSetValue ($oQuery, "123")
_IEFormSubmit ($oForm,0)
发表于 2009-6-21 12:19:52 | 显示全部楼层
给个地址吧,。我帮你

oForm你给的源码没见到
发表于 2009-6-21 12:21:45 | 显示全部楼层
$oForm = _IEFormGetObjByName($oIE, "你没有给出")
$oQuery =_IEFormElementGetObjByName ($oForm, "sAccount")
_IEFormElementSetValue ($oQuery, "张三")
$oQuery =_IEFormElementGetObjByName ($oForm, "sPasswd")
_IEFormElementSetValue ($oQuery, "123")
_IEFormSubmit ($oForm,LoginButton);BS你,连这个地方也不知道,在哪copy过来的吧
 楼主| 发表于 2009-6-21 13:00:10 | 显示全部楼层
$oForm = _IEFormGetObjByName($oIE, "你没有给出")
$oQuery =_IEFormElementGetObjByName ($oForm, "sAccount")
_IEFormElementSetValue ($oQuery, "张三")
$oQuery =_IEFormElementGetObjByName ($oForm, "sPasswd")
_IEFormElementSetValue ($oQuery, "123")
_IEFormSubmit ($oForm,LoginButton);BS你,连这个地方也不知道,在哪copy过来的吧
-----------------------
这个是我自己做的别的自动脚本。肯定是COPY过来的。

这个网页是我们公司的内网。

这个我用“检测表单工具.exe” 就是查找不到
 楼主| 发表于 2009-6-21 13:02:18 | 显示全部楼层
没有表单难度就不能 自动登陆了?
发表于 2009-6-21 13:11:27 | 显示全部楼层
不懂,帮顶了
发表于 2009-6-21 13:12:40 | 显示全部楼层
本帖最后由 passkalilo 于 2009-6-21 13:14 编辑
$obj = _IEGetObjByName($oIE,"sAccount")
_IEFormElementSetValue($obj,"张三“)
$obj = _IEGetObjByName($oIE,"sPassword")
_IEFormElementSetValue($obj,"密码“)
$obj = _IEGetObjByName($oIE,"LoginButton")
_IEAction($obj,"click")
发表于 2009-6-21 13:21:16 | 显示全部楼层
没有表单难度就不能 自动登陆了?
dgmax 发表于 2009-6-21 13:02

不一定,你也可以用10楼的试试
发表于 2009-6-21 13:26:59 | 显示全部楼层
实在不行,这个试试,没有网址测试,没办法解决你的问题,搞表单有很多种方法
#include<IE.au3>
$oIE = _IECreate("地址")
$LogName = _IEGetObjByName($oIE,"sAccount")
$Pssswd = _IEGetObjByName($oIE,"sPasswd")
_IEPropertySet($LogName,"innertext","登陆号码")
_IEPropertySet($Pssswd,"innertext","登陆密码")
$login = _IEGetObjByName($oIE,"LoginButton")
_IEAction($login,"click")
发表于 2009-6-21 13:30:09 | 显示全部楼层
_IEGetObjById

我不是太会,你可以请教lynfr8 和bob
发表于 2009-6-21 13:30:30 | 显示全部楼层
好了,走人
发表于 2009-6-21 14:25:09 | 显示全部楼层
去看一下帮助里的——IEGetObjByID()
直接用对象操作
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-5-12 11:37 , Processed in 0.088104 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表