无FORM的网页怎么实现INPUT自动输入
此网页有INPUT控件但无FORM表单项,怎么实现自动输入用户名和密码呢?部分代码如下<body>
<div id="qo-login-panel">
<img src="./SysManager/images/blank.gif" class="qo-login-logo qo-abs-position" />
<div class="qo-login-benefits qo-abs-position"></div>
<!--
<img src="./SysManager/images/blank.gif" class="qo-login-screenshot qo-abs-position" />
-->
<label id="field1-label-userAccount" class="qo-abs-position" accesskey="e" for="field1">
<span class="key"></span>用户名称:
</label>
<input class="qo-abs-position" type="text" name="field1-userAccount" id="field1-userAccount" value="" />
<label id="field2-label-userPwd" class="qo-abs-position" accesskey="p" for="field2">
<span class="key"></span>用户密码:
</label>
<input class="qo-abs-position" type="password" name="field2-userPwd" id="field2-userPwd" value="" />
<input id="submitBtn" class="qo-login-submit qo-abs-position" type=submit value="登录" />
</div>
</body> $sUrl = "test.htm";网页,作为测试,可将你在贴子中的网页代码存为test.htm文件
$oIE = _IECreate($sUrl)
$oQuery = _IEGetObjById($oIE,"field1-userAccount")
$oQuery.value = "用户名";输入用户名
$oQuery = _IEGetObjById($oIE,"field2-userPwd")
$oQuery.value = "密码";输入密码
$oQuery = _IEGetObjById($oIE,"submitBtn")
_IEAction($oQuery,"click");点登陆
_IELoadWait($oIE) 本帖最后由 mpf1240 于 2011-3-7 17:25 编辑
谢谢,解决了!不胜感激! thanks!!!good example....
页:
[1]