找回密码
 加入
搜索
查看: 1165|回复: 1

#include <IE.au3> 小弟不才,无法提交表单

[复制链接]
发表于 2009-5-6 14:19:14 | 显示全部楼层 |阅读模式
本帖最后由 dgmax 于 2009-5-6 17:00 编辑

以下网页源代码
---------------------------
</script>
<script language='javascript'>
function subm()
{
        if (document.getElementById("logU").value=="")
        {
                alert("用户名不能为空……")
                document.getElementById("logU").focus();
                return false;
        }
        else if(document.getElementById("pasW").value=="")
        {
                alert("密码不能为空……")
                document.getElementById("pasW").focus();
                return false;
        }
        else
        {
                name=document.getElementById("logU").value;
                pasw=document.getElementById("pasW").value;
                re1=/\d+/g;
                re2=/[a-z]|[A-Z]/g;
                re3=/\W+/g;
                num1=pasw.toString().search(re1);
                num2=pasw.toString().search(re2);
                num3=pasw.toString().search(re3);
                num4=pasw.toString().length;
                if (num1==-1 || num2==-1 || num3==-1 ||num4<6)
                {
                        alert("你的密码中不符合集中登录系统的密码规则,建议遵循密码规则尽快修改你的\n\n密码,欲了解密码规则,请登录后查看弹出窗口。");
                        return true;
                }
                else
                {
                        return true;
                }
                //window.location="http://10.16.132.119/jzdl/default.asp?name="+name+"&pasw="+pasw;
        }
}


----------------------------------------

$oForm = _IEFormGetObjByName($oIE, "subm")
$oQuery =_IEFormElementGetObjByName ($oForm, "logU")
_IEFormElementSetValue ($oQuery, "张三")
$oQuery =_IEFormElementGetObjByName ($oForm, "pasW")
_IEFormElementSetValue ($oQuery, "Zz123456~")
$oQuery =_IEFormImageClick ($oForm,"提交")
_IEAction($oQuery,"click")
 楼主| 发表于 2009-5-6 17:00:03 | 显示全部楼层
多谢JHWL同志 的检测表单工具
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-6-3 09:37 , Processed in 0.070050 second(s), 20 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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