光标的位置问题

mabelgao 2002-12-03 09:03:26
在一个登陆页面内,如何实现一打开页面,光标就在用户名的位置上。
...全文
43 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
meizz 2002-12-03
  • 打赏
  • 举报
回复
<body onload="document.all.inputName.focus();">
那个 inputName 就是你要放光标的那的文本框的 name
m1_1m 2002-12-03
  • 打赏
  • 举报
回复
<script language=vbscript>
sub aa()
form1.name1.focus ()
end sub
</script>
<body onload=aa() >
<form action="index.asp" method="post" id="form1" name="form1" >
用户名<input class=txet name=name1 size=10>
密 码<input class=txet name=name2 size=10>
<input class=button name=Button type=button value=确定>
<input class=button name=Submit2 type=button value=取消>
</form>
</body>
刚才位置放错了。
m1_1m 2002-12-03
  • 打赏
  • 举报
回复
<script language=vbscript>
sub aa()
form1.name1.focus ()
end sub
</script>
<body onload=aa() >
<form action="index.asp" method="post" id="form1" name="form1" >
<input class=txet name=name size=10>
用户名<input class=txet name=name1 size=10>
密 码<input class=button name=Button type=button value=确定>
<input class=button name=Submit2 type=button value=取消>
</form>
</body>
wpmsoft 2002-12-03
  • 打赏
  • 举报
回复
设置焦点在输入框处。

—————————————————————————————————
   ★ 与人玫瑰,手有余香 ★

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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