两个FORM用键盘作快速跳转提交的JS怎写?

zhlym 2003-09-13 07:40:34
<form name="order" method="POST" autocomplete="off" target="Boardin1">
<input type="text" name="tmname" size="16"> <input type="submit" value="输 入" name="pro" >
<input type="button" value="查 询" name="pro1" >
</form>

<form name="order1" method="POST" action="lingsellmao.asp" autocomplete="off" target="_top">
<input type="text" name="tm" size="16" value="0">
</form>
一开始光标落在表单order的tmname文本框里,现在如何写一段JS能把光标跳至表单order1,并提交该表单,请各高手帮助.
...全文
94 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
chinesun 2003-09-13
  • 打赏
  • 举报
回复
<form name="order" method="POST" autocomplete="off" target="Boardin1">
<input type="text" name="tmname" size="16" tabindex=0> <input type="submit" value="输 入" name="pro" tabindex=1>
<input type="button" value="查 询" name="pro1" tabindex=2>
</form>

<form name="order1" method="POST" action="lingsellmao.asp" autocomplete="off" target="_top">
<input type="text" name="tm" size="16" value="0" tabindex=3>
</form>
wanghr100 2003-09-13
  • 打赏
  • 举报
回复
跳转+提交.

<form name="order" method="POST" autocomplete="off" target="Boardin1">
<input type="text" name="tmname" size="16" tabindex="1" onblur="document.order.submit()"> <input type="submit" value="输 入" name="pro" >
<input type="button" value="查 询" name="pro1" >
</form>

<form name="order1" method="POST" action="lingsellmao.asp" autocomplete="off" target="_top">
<input type="text" name="tm" size="16" value="0" tabindex="2">
</form>
wanghr100 2003-09-13
  • 打赏
  • 举报
回复
给你修改了一下, 用tab键可以实现快速跳转.

<form name="order" method="POST" autocomplete="off" target="Boardin1">
<input type="text" name="tmname" size="16" tabindex="1"> <input type="submit" value="输 入" name="pro" >
<input type="button" value="查 询" name="pro1" >
</form>

<form name="order1" method="POST" action="lingsellmao.asp" autocomplete="off" target="_top">
<input type="text" name="tm" size="16" value="0" tabindex="2">
</form>
zhlym 2003-09-13
  • 打赏
  • 举报
回复
高手们帮帮忙吧
zhlym 2003-09-13
  • 打赏
  • 举报
回复
小弟不才,能告状tabindex的具体用法吗?麻烦按我的例子加上去示范一下,谢谢
chinesun 2003-09-13
  • 打赏
  • 举报
回复
不用JS写
用tabindex=0...n
0是第一个,1是第二个...n是第n个。

28,391

社区成员

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

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