delphi初学,想写一个网页自动登陆的小程序,但不知道如何着手网页地址:http://www.fy114.com.cn/yygh/login.aspx

解决方案 »

  1.   

    问题来了:登陆后,现现一个界面很简单。
    左边有四个按钮,右边是空的。
    点击左边的部门按钮,右边出现一个非常简单的表单,两个下拉框,一个验证码输入框,一个确定按钮。要求:登陆后,自动点击 左边的  部门  按钮。右的的两个下拉框,选中第1项,自动输入验证码,点击确定后。获取弹出来的消息。
    我看了站上的源码,那几个按钮找不到控件名,代码也非常的简单。简直无从入手。[code=VB.NET]<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head id="head1">
    <style type="text/css">
    a:visited{text-decoration:none;color : 000000}
    a:link{text-decoration:none;color : 000000}
    a:hover{text-decoration:none;color : 04266d}
    </style>
        <title>
    标准网页
    </title></head>
    <body style="width:100%;background-color:#ffffff; margin-left:0; margin-top:0;margin-bottom:0;margin-right:0;">
        <form name="form1" method="post" action="index.aspx" id="form1">
    <div>
    <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUJLTUyNDYyNzc1D2QWAgIDD2QWBAIDDw8WAh4EVGV4dAUG6auY5rSBZGQCBQ8PFgIfAAURMjAxMC03LTI5IDg6MjQ6MDdkZGTFFCUdIKGlXB7WvW9lIl5C/6kUcg==" />
    </div>    <div>
    <!--table width=770 border=0 cellpadding=0 cellspacing=0 align="center"-->
    <table style="width:100%;border:0;text-align:center;" cellpadding="0" cellspacing="0">
    <tr>
    <td colspan="2" style="height: 59px">
                
    <style type="text/css">
    <!--
    *{margin:0;padding:0;border:0;}body {
    margin-top: 0px;
    margin-left: 0px;
    margin-right: 0px;
    margin-bottom: 0px;
    }
    .z1 {
    background-image: url(image/f2.gif);
    background-repeat: repeat-x;
    height: 81px;
    padding-top: 10px;
    }
    .z1 .z11 {
    height: 30px;
    }
    .z1 .z11 .logo {
    width: 200px;
    float: left;
    margin-left: 10px;
    }
    .z1 .z11 .name {
    float: left;
    font-size: 12px;
    margin-left: 50px;
    color: #385975;
    }
    .z1 .z11 .tc {
    font-size: 12px;
    float: left;
    margin-left: 200px;
    }
    .z1 .z12 {
    padding-left: 200px;
    font-size: 14px;
    font-weight: bold;
    padding-top: 10px;
    }
    .z1 .z12 li {
    display: inline;
    }
    .z1 .z12 a {
    text-align: center;
    float: left;
    height: 30px;
    width: 91px;
    padding-top: 9px;
    }
    .z1 .z12 li a:link {
    color: #4B6888;
    text-decoration: none;
    }
    .z1 .z12 li a:visited {
    text-decoration: none;
    color: #4B6888;
    }
    .z1 .z12 li a:hover {
    text-decoration: none;
    color: #FFFFFF;
    background-image: url(image/f1png_03.gif);
    background-repeat: no-repeat;
    height: 30px;
    width: 91px;
    padding-top: 9px;
    background-position: left top;
    }
    .z1 .z12 li a:active {
    text-decoration: none;
    color: #FFFFFF;
    background-image: url(image/f1png_03.gif);
    background-repeat: no-repeat;
    }
    a:link {
    color: #385975;
    text-decoration: none;
    }
    a:visited {
    text-decoration: none;
    color: #385975;
    }
    a:hover {
    text-decoration: none;
    color: #FF6600;
    }
    a:active {
    text-decoration: none;
    color: #FF6600;
    }
    -->
    </style>
    <div class="z1">
      <div class="z11">
        <div class="logo"><img id="webheadcontrol1_Image1" src="image/dk_logo.gif" style="border-width:0px;" /></div>
        <div class="name"></div>
        <div class="tc"></div>
      </div>
      <div class="z12">
      </div>
    </div>
            </td>
    </tr>
    <tr style="height:100%;">
    <td colspan="2" style="font-size: 12px; color: black; height: 45px;">
                <table cellspacing="0">
                    <tr>
                        <td align="center" style="width: 500px; height: 25px;">
                           欢迎您:<span id="users">李洁</span>
                        </td>
                        <td align="center" style="width: 500px; height: 18px;">
                            登陆时间:<span id="logintime">2010-7-29 8:24:07</span>
                        </td>
                        <td align="center"  style="width:456px">
                            <input type="submit" name="exit" value="【退出】" id="exit" style="background-color:White;" />
                        </td>
                    </tr>
                </table>
            </td>
    </tr>

    <tr>
    <td valign="top" style="width:183px;">
            <iframe style="height:650px; width: 183px;"  frameborder="0" name="menu" scrolling="no" src="left.aspx">
            </iframe>
    </td>
    <td valign="top" style="width:100%; text-align:left;">
    <iframe style="height:650px; width:100%;" frameborder="0" name="mainframe" scrolling="no" src="right.htm">
            </iframe>
            </td>
    </tr>
    </table>
        </div>
        
    <div> <input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWAgKV+eqhDwKIlLXXC60PRi+zaT6zrIezJS7Dd+5bvSb5" />
    </div></form>
      </body>
    </html>[/code]
      

  2.   

    -_-!!!!还纳闷DELPHI怎么快速开始WEB呢