JS enter代替tab,只有部分键可以代替
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<meta charset="utf-8" />
<script>
onload = function () {
var txts = document.getElementsByTagName('input');
for (var i = 0; i < txts.length; i++) {
if (txts[i].type == 'text') {
txts[i].onkeydown = function () {
//alert(window.event.keyCode);
if (window.event.keyCode==13) {//enter
window.event.keyCode = 9; //tab IE可以用
}
}
}
}
}
</script>
</head>
<body>
<input type="text" name="name" value="" />
<input type="text" name="name" value="" />
<input type="text" name="name" value="" />
<input type="text" name="name" value="" />
<input type="text" name="name" value="" />
</body>
</html>
最新文章
- jQuery语法介绍
- PHP会话Session
- Moses创建一个翻译系统的基本过程记录,以后会按照每个过程详细说明,并给出每个步骤的参数说明
- Mac上mariadb的启动与关闭
- go操作数据库 Go-SQL-Driver/MySQL 使用详解
- CheckedListBox与下拉框联动代码
- unity3d 下操作excel 与打印
- 数据结构 --- 线性表学习(php模拟)
- Doxygen安装使用
- oracle11g ora-12514监听程序当前无法识别
- linux下ip命令用法
- 用css3实现各种图标效果
- 6. Java 加解密技术系列之 3DES
- ui-router ^1.x在ng1中使用state events
- [STF手机设备管理平台]连接其它操作系统上的安卓设备实操介绍
- AutoMapper.Mapper.CreateMap报“System.NullReferenceException: 未将对象引用设置到对象的实例。”异常复现
- 完全卸载oraclean安装
- ztree默认自动打开第一级
- 【转】eclipse运行 Ant报错Could not find the main class: org.eclipse.ant.internal.launching.remote.InternalAntRunner. Program
- 【delphi】delphi的TAdoQuery读取Excel数据
热门文章
- windows 空闲超时 非管理员如何破解
- 微信测试号开发之四 获取access_token和jsapi_ticket
- php实现 求int型数据在内存中存储时1的个数(函数都可自己实现)
- 前端开发必备调试工具(Chrome的F12自带的功能和firebug插件差不多)
- [CSS Flex] Flex direction
- oracle改动登录认证方式
- swift菜鸟入门视频教程-01-基础部分
- 数码测色计获取UIColor的RGB
- RGB 的调色
- 【50.88%】【Codeforces round 382B】Urbanization