event.keyCOde=9 能不能代替TAB键?

riyao 2006-03-09 06:39:50
<input type="text" name="textfield" onkeypress="event.keyCode=9">
<input type="text" name="textfield2">

为什么不能在第一个文本框按下时跳到第二个文本框???
就是想用来模仿TAB键的功能...

谢谢了..!
...全文
574 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
afoskoo 2006-03-10
  • 打赏
  • 举报
回复
document.onkeydown=function(){
if(event.keyCode==13) event.keyCode=9;
}
quhaihua 2006-03-09
  • 打赏
  • 举报
回复
<INPUT style="Z-INDEX: 102; LEFT: 312px; POSITION: absolute; TOP: 208px" type="text" onkeydown="event.keyCode=9;">
chouchy 2006-03-09
  • 打赏
  • 举报
回复
<input type="text" name="textfield" onkeypress="event.keyCode=9">
~~~~~~~~~~
onkeypress->onkeydown
DeluxWorld 2006-03-09
  • 打赏
  • 举报
回复
用回车模拟Tab:
<input type="text" name="textfield" onkeydown="if(event.keyCode==13)event.keyCode='9'">
<input type="text" name="textfield2">

87,917

社区成员

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

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