如何使用键盘上的Enter键将一个字段移到另一个字段? [英] How to move one field to another field using enter key in keyboard?

查看:72
本文介绍了如何使用键盘上的Enter键将一个字段移到另一个字段?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尊敬的先生,

如何使用键盘中的Enter键将一个字段移动到另一字段
有序...

示例:

用户注册:
文本框,下拉列表,单选按钮,复选框和按钮"字段在那里.

无需使用鼠标键即可注册这些详细信息.

通过mohan.

Dear sir,

How to move one field to another field using enter key in keyboard
orderly...

Example:

User Registration:
Text boxes, drop down lists,Radio buttons, check boxes and Buttons field is there.

without using mouse key how to registered these details.

By mohan.

推荐答案

使用这些代码,希望它能解决您的问题:-

using these code i hope it will solve your problem:-

<body onkeydown="IsEnterPressed();"></body>



并在js中定义函数



and in js define function

function IsEnterPressed()
{
    if(event.keyCode==13 && event.srcElement.type!='submit' && event.srcElement.type!='textarea')
        event.keyCode=9;

    return true;
}



并定义控件的tabindexs,以便在按键时要移动光标的顺序输入



and define the tabindexs of controls in order as you want to move cursor as you Press Key enter


这篇关于如何使用键盘上的Enter键将一个字段移到另一个字段?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆