easyui中方向键、tab键、回车键
1.html中
function changeTab(event, i) {
var keyCode = event.keyCode;
var inputs = jQuery("#table :input"); // 获取表单中的所有输入框
var idx = inputs.index(i);
if (inputs.length < ) {
return false;
}
if(idx >= inputs.length - ){
switch (keyCode) {
case : //↑
inputs[idx - ].focus(); // 设置焦点
inputs[idx - ].select(); // 选中
break;
default:
break;
}
}else if(idx < ){
switch (keyCode) {
case : //回车键
inputs[idx + ].focus(); // 设置焦点
inputs[idx + ].select(); // 选中
break;
case : //↓
inputs[idx + ].focus(); // 设置焦点
inputs[idx + ].select(); // 选中
break;
default:
break;
}
}else{
switch (keyCode) {
case : //回车键
inputs[idx + ].focus(); // 设置焦点
inputs[idx + ].select(); // 选中
break;
case : //←
inputs[idx - ].focus(); // 设置焦点
inputs[idx - ].select(); // 选中
break;
case : //↑
inputs[idx - ].focus(); // 设置焦点
inputs[idx - ].select(); // 选中
break;
case : //→
inputs[idx +].focus(); // 设置焦点
inputs[idx +].select(); // 选中
break;
case : //↓
inputs[idx + ].focus(); // 设置焦点
inputs[idx + ].select(); // 选中
break;
default:
break;
}
}
return true;
}
easyui中方向键、tab键、回车键的更多相关文章
- 转:设置Eclipse中的tab键为4个空格的完整方法
from: https://my.oschina.net/xunxun10/blog/110074 设置Eclipse中的tab键为4个空格的完整方法 收藏 XunXun10 发表于 4年前 阅读 ...
- CentOS中按tab键不能自动补全问题解决办法
CentOS中按tab键不能自动补全问题解决办法 一:检查一下系统有没有安装bash-completion包. 二:yum查找一下 三:yum安装bash-completion包 前言 在CentOS ...
- 修复duilib CEditUI控件和CWebBrowserUI控件中按Tab键无法切换焦点的bug
转载请说明原出处,谢谢~~:http://blog.csdn.net/zhuhongshu/article/details/41556615 在duilib中,按tab键会让焦点在Button一类的控 ...
- html中控制Tab键的顺序
在做项目中,需要控制html页面上登陆表单的按Tab键的顺序,代码如下: <tr> <td width="19%&quo ...
- Unbuntu 终端中使用Tab键不能自动补全
解决方案 1.利用vi编辑器打开 /etc/bash.bashrc文件(需要root权限) sudo vi /etc/bash.bashrc 2.找到文件中的下列代码 #enable bash com ...
- linux中设置TAB键的宽度
对于编程的人员来说,常常须要排版代码,这时候就须要TAB键,但TAB键的宽度太大,非常有可能代码太长,延伸到下一行,这个时候你就须要设置TAB键的宽度了. linux下设置TAB键的宽度,做法例如以下 ...
- 设置Eclipse中的tab键为4个空格
在工具栏上找到window,点击 window->preference 然后在打开的界面中选择 General->Editors->Text Editors, 再选中右侧的 inse ...
- 设置Eclipse中的tab键为4个空格的完整方法
1.点击 window->preference-,依次选择 General->Editors->Text Editors,选中右侧的 insert space for tabs;如下 ...
- VIM中使用tab键自动完成(vim tab键自动补全 )插件supertab
supertab.vmb 这个插件好好用, Tab自动补全 http://www.vim.org/scripts/script.php?script_id=1643 安装步骤: 1.下载 supert ...
随机推荐
- linux进程后台运行及输出重定向
本机环境为ubuntu 14.04 以ping www.baidu.com为例: 1.程序的前台运行 ping www.baidu.com 可以看到,屏幕上输出了baidu返回的结果 2.实现程序后台 ...
- SQL Server 里的递归查询
http://www.360doc.com/content/13/0607/11/8463843_291221684.shtml
- php清理服务器无效软链接(源码)
<?php /** * @desc 递归删除当前目录下的无效软连接 * @author mengdj<mengdj@outlook.com> 2014.10.03 1118 */ / ...
- git使用手册
1.git常用命令 >>首先做git clone 形成本地repository: >>然后做checkout形成分支 列出所有分支 $ git branch –r 切换到新分 ...
- Python新建动态命名txt文件
# -*- coding: utf-8 -*- import os,sys,time fname=r"D:\01-学习资料\python" def GetNowTime():#获取 ...
- tomcat:域名指向项目名
把项目部署到tomcat目录webapps后,使用域名访问的时候域名后面需要加上项目名称,如果想直接输入域名就可以访问项目呢?看了下tomcat官方文档,我修改了tomcat安装目录下conf/ser ...
- gem安装报错解决方法
gem install rdiscount -- --use-system-libraries
- Session 、Application 和 HttpContext 的使用区别
在ASP.NET WEB页面开发中,经常会需要保存一些信息,以便在不同的页面或时间段都能够访问到.这其中便会用到Session和Application. Session .Application 和 ...
- Sage Crm 权限原理分析
文字是11年写的,贴出来共享一下,先来一张表结构图: 一.区域.表名:[territories] 1.我们先来看看区域表的结构. 从图中前面都是不能为空的字段,都是很重要的.来介绍一下这些字段: Te ...
- linux时间同步ntp服务的安装与配置
1.首先安装NTP [root@localhost /]# yum install ntp -y 2.修改NTP配置文件,添加NTP服务器的网络位置 /etc/ntp.conf # For mo ...