找回密码
 加入
搜索
查看: 1246|回复: 6

关于写入IE里的INPUT数据的问题

[复制链接]
发表于 2009-6-12 10:05:41 | 显示全部楼层 |阅读模式
本帖最后由 jale 于 2009-6-22 08:42 编辑

我通过以下方法,对IE里的INPUT窗口SET值。
$oIE=_IEAttach($win_name);把该窗口作为当前窗口  
$oForm = _IEFormGetObjByName ($oIE, $dl_ck)            ;通过该IE窗口找到登录的form
$oQuery = _IEFormElementGetObjByName ($oForm, $DL_YHKJ) ;通过找到的form找到登录的用户控件
_IEFormElementSetValue ($oQuery, $yhm)

首先我获取IE页面,然后获取IE里的FORM,然后获取IE里FORM的控件,然后SET值进去

一般窗口都没问题,但是遇到个这样的页面,我没办法了,源码如下,有没有其他方法读取它?

        <div id="subwindowLogin"  style="width:420;height:200;"><table style="width:100%;height:100%"><tr><td></td></tr><tr><td><div style="width:100%;height:100%">
                                <table width="100%" height="100%"
                                        style="filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#FFFFFF, endColorstr=#DAE4F3);">
                                        <tr>
                                                <td align="center" width="100"
                                                        style="border-color: #BACDE9; border-style: solid;  border-width: 1px; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#F2F5FB, endColorstr=#FFFFFF);">
                                                        <img src="sample/main/style1/images/login.gif">
                                                </td>
                                                <td>
                                                        &nbsp;&nbsp;
                                                </td>
                                                <td>
                                                        <table style="width: 100%">
                                                                <tr height="8">
                                                                        <td width="80"></td>
                                                                        <td></td>
                                                                </tr>
                                                                <tr>
                                                                        <td align="right">
                                                                                用户名
                                                                        </td>
                                                                        <td>
                                                                                <input type="text" id="editorUser" style="width:202;">
                                                                        </td>
                                                                </tr>
                                                                <tr>
                                                                        <td align="right">
                                                                                口令
                                                                        </td>
                                                                        <td>
                                                                                <input type="password" id="editorPassword" style="width:202;">
                                                                        </td>
                                                                </tr>
                                                                <tr height="10">
                                                                        <td></td>
                                                                        <td></td>
                                                                </tr>
                                                                <tr>
                                                                        <td></td>
                                                                        <td align="right">
                                                                                <img border="0" src="sample/main/style1/images/next.gif" onclick="if(!editorPassword.isReadOnly()){commandLogin.execute();}"
                                                                                        style="cursor: hand">
                                                                        </td>
                                                                </tr>
                                                        </table>
                                                </td>
                                                <td>
                                                        &nbsp;&nbsp;
                                                </td>
                                        </tr>
                                </table>
                        </div></td></tr></table></div>
发表于 2009-6-12 11:04:09 | 显示全部楼层
有没有其他方法读取它?

楼主什么意思?要问的是什么?
 楼主| 发表于 2009-6-12 14:35:21 | 显示全部楼层
你好,我这里的代码可以向IE SET值,但是这种页面没有FORM,怎样去SET
发表于 2009-6-12 14:51:30 | 显示全部楼层
不懂,等待正解
发表于 2009-6-12 17:05:59 | 显示全部楼层
用ID看行不
$o = _iegetobjbyID($oIE, 'editorUser')
if isobj($o) then $o.value = '你想设置的值'
发表于 2009-6-12 21:49:20 | 显示全部楼层
楼上的应该可以的啊..
 楼主| 发表于 2009-6-22 08:41:54 | 显示全部楼层
谢谢,问题解决了。。。。。。。。。
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-5-10 21:16 , Processed in 0.074654 second(s), 19 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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