针对easyui控件前端组织的dom做分析,如下:

combo/combobox/combogrid类似结构如下:

<input class="easyui-datebox datebox-f combo-f textbox-f" id="myid" data-options="required: true,buttons:buttons,editable:false,onSelect:selectSDate" style="width: 120px; display: none;">
<span class="textbox textbox-invalid combo datebox" style="width: 120px; height: 22px;">
<span class="textbox-addon textbox-addon-right" style="right: 0px;">
<a href="javascript:void(0)" class="textbox-icon combo-arrow" icon-index="0" tabindex="-1" style="width: 18px; height: 20px;"></a>
</span>
<input type="text" class="textbox-text validatebox-text textbox-prompt validatebox-invalid" autocomplete="off" readonly="readonly" placeholder="" style="margin-left: 0px; margin-right: 18px; padding-top: 1px; padding-bottom: 1px; width: 100px;" title="">
<input type="hidden" class="textbox-value" name="" value="">
</span>

datebox类似结构如下:

<input class="easyui-datebox datebox-f combo-f textbox-f" id="myid" data-options="buttons:buttons,editable:false,onSelect:selectEDate" style="width: 120px; display: none;">
<span class="textbox combo datebox" style="width: 120px; height: 22px;">
<span class="textbox-addon textbox-addon-right" style="right: 0px;">
<a href="javascript:void(0)" class="textbox-icon combo-arrow" icon-index="0" tabindex="-1" style="width: 18px; height: 20px;"></a>
</span>
<input type="text" class="textbox-text validatebox-text textbox-prompt" autocomplete="off" readonly="readonly" placeholder="" style="margin-left: 0px; margin-right: 18px; padding-top: 1px; padding-bottom: 1px; width: 100px;">
<input type="hidden" class="textbox-value" name="" value="">
</span>

textbox,textbox多行文本类似结构如下:

<input class="easyui-textbox textbox-f" id="myid" data-options="multiline:true,height:50" style="width: 95%; display: none;">
<span class="textbox easyui-fluid" style="width: 927px; height: 50px;">
<textarea class="textbox-text validatebox-text textbox-prompt" autocomplete="off" placeholder="" style="margin-left: 0px; margin-right: 0px; height: 48px; width: 925px;"></textarea>
<input type="hidden" class="textbox-value" value="">
</span>

故可以使用如下获取焦点:

$('#myid').next('span').find('.textbox-txt').focus();

easyui 控件获取焦点方式的更多相关文章

  1. easyui表单多重验证,动态设置easyui控件

    要实现的功能:在做添加学生信息的时候,利用easyui的验证功能判断 学号是否重复和学号只能为数字 最终效果如下图: 但在做这个的过程中,遇到了一系列的问题: 扩展validatebox的验证方法,最 ...

  2. 动态添加easyui 控件

    jquery提供了append,appendTo方法,可以动态添加静态的html文本,在easyui中,要动态添加easyui控件要怎么做呢,下面就来介绍动态添加easyui控件. 使用方法:和添加静 ...

  3. EasyUI控件combobox重复请求后台,dialog窗口数据异常

    最近在用Easy UI+Dapper+MVC4 开发一个财务收款系统,其中就发现一些小问题,供有需要的人参考. 1.EasyUI控件combobox 数据绑定 出现重复请求后台 上代码: <td ...

  4. EasyUi控件Datagrid

    很久没有打开我的博客园,刚刚大概扫了一眼我之前写的笔记,关于Devexpress那篇居然有四千多的浏览记录,不知道对浏览过的博友有没有起到一点点作用.当然我写笔记仅仅只是给自己留个记忆,如果歪打正着帮 ...

  5. Easyui 控件的初始化方法

    问题: Easyui的控件在初始化的时候有两种方式: 页面指定class属性 js里初始化该id为easyui的控件 那么问题是: 如果页面不指定class属性,只是使用js初始化的话,会导致无法用控 ...

  6. js,onblur后下一个控件获取焦点判断、html当前活跃控件、jquery版本查看、jquery查看浏览器版本、setTimeout&setInterval

    需求: input控件在失去焦点后直接做验证,验证通不过的话,显示相应错误.但是如果失去焦点后点击的下个控件是比较特殊的控件(比如,退出系统),那么不执行验证操作,直接退出系统(防止在系统退出前,还显 ...

  7. 扩展 easyui 控件系列:为datagrid 增加过滤行

    此功能还为真正完成,起到抛砖引玉的效果,发动大家的力量把这个功能完善起来,效果图如下: 基本上就是扩展了 datagrid.view 中的onAfterRender 这个事件,具体代码如下: $.ex ...

  8. appium+python:自己写的一个滑动控件的方式

    #调用方式roll_ele("ID","ele_id","7","up",3)#将控件分为7格,从底部倒数第二格向上滑动 ...

  9. easyui控件的加载顺序

    使用easyui做布局时,会模仿窗口程序界面,做出一些较复杂的布局.按由外层到内层的顺序: (最外层)panel->tabs->tabs1 ->tabs2->layout-&g ...

随机推荐

  1. Ubuntu环境下No module named '_tkinter'错误的解决

    在Ubuntu环境下运行下面代码: import matplotlib as plt 出现以下错误: No module named '_tkinter' 解决方法: sudo apt-get ins ...

  2. Alpha冲刺——第九天

    Alpha第九天 听说 031502543 周龙荣(队长) 031502615 李家鹏 031502632 伍晨薇 031502637 张柽 031502639 郑秦 1.前言 任务分配是VV.ZQ. ...

  3. Task Class .net4.0异步编程类

    文章:Task Class 地址:https://docs.microsoft.com/zh-cn/dotnet/api/system.threading.tasks.task?view=netfra ...

  4. Android工程方法数超过64k,The number of method references in a .dex file cannot exceed 64K.

    最近将一个老的Eclipse项目转到Android Studio后,用gradle添加了几个依赖,项目可以make,但是一旦run就报错 Error:The number of method refe ...

  5. Alpha 冲刺10

    队名:日不落战队 安琪(队长) 今天完成的任务 整理项目. okhttp学习第四弹. 明天的计划 okhttp学习第五弹. 阶段反思. 睡觉. 还剩下的任务 个人信息数据get. 遇到的困难 困难:好 ...

  6. lintcode-206-区间求和 I

    206-区间求和 I 给定一个整数数组(下标由 0 到 n-1,其中 n 表示数组的规模),以及一个查询列表.每一个查询列表有两个整数 [start, end] . 对于每个查询,计算出数组中从下标 ...

  7. QList和QVector使用

    版权声明:若无来源注明,Techie亮博客文章均为原创. 转载请以链接形式标明本文标题和地址: 本文标题:QList和QVector使用     本文地址:http://techieliang.com ...

  8. Django之ORM对数据库操作

    基本操作 <1> all(): 查询所有结果 <2> filter(**kwargs): 它包含了与所给筛选条件相匹配的对象 <3> get(**kwargs): ...

  9. mysql中一些表选项

    表选项列表 表选项就是,创建一个表的时候,对该表的整体设定,主要有如下几个: charset = 要使用的字符编码, engine = 要使用的存储引擎(也叫表类型), auto_increment ...

  10. 【OpenGL】使用FreeType库加载字体并在GL中绘制文字

    FreeType用起来比较麻烦,这里写了一份简单的示例代码,仅供参考. 实现了FT库生成字符位图,并上传到GL纹理. 实现了字符位图缓存功能,多个字符图像保存在同一个纹理中. 实现了简单的字体管理框架 ...