自动点击按钮,求大神解救!

xuedingwen 2011-05-09 03:15:59
<form name="login"action="index.php" method="post" id="login">
<div class="loginform">
<div class="form-label"><label for="username"><?php print_string("username") ?></label></div>
<div class="form-input">
<input type="text" name="username" id="username" size="15" value="<?php p($frm->username, true) ?>" />
</div>
<div class="clearer"><!-- --></div>
<div class="form-label"><label for="password"><?php print_string("password") ?></label></div>
<div class="form-input">
<input type="password" name="password" id="password" size="15" value="" />
<input name="loginxdw" type="submit" id="loginxdw" value="登陆" />
<input type="hidden" name="testcookies" value="1" />
</div>
<div class="clearer"><!-- --></div>
</div>
</form>
</div>

由于参数已经通过别的途径传到这个页上了

只希望到达这个页的时候能够自动点击下登陆

花了好长时间了,求解救
...全文
75 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
xuexiaodong2009 2011-05-09
  • 打赏
  • 举报
回复
document.document.forms["login"].submit();
小辛、 2011-05-09
  • 打赏
  • 举报
回复
先进行判断该参数是否 var ss;

if(ss>10)
{
document.document.forms["login"].submit();
}
fengqipiaobo 2011-05-09
  • 打赏
  • 举报
回复

<body onload="document.login.submit();">
</body>


zell419 2011-05-09
  • 打赏
  • 举报
回复
window.onload = function(){
document.getElementById("loginxdw").click();
}
Jio下的影子 2011-05-09
  • 打赏
  • 举报
回复
body里写onload()方法

87,907

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧