TextBox

Extend from $.fn.validatebox.defaults. Override defaults with $.fn.textbox.defaults.

The TextBox component is a enhanced input field that allows users build their form easily. It is the base component for building other complex components such as combo,datebox,spinner,etc.

Dependencies

  • validatebox
  • linkbutton

Usage Example

Create textbox from markup.

  1. <input class="easyui-textbox" data-options="iconCls:'icon-search'" style="width:300px">

Create textbox by using javascript.

  1. <input id="tb" type="text" style="width:300px">
  1. $('#tb').textbox({
  2. buttonText:'Search',
  3. iconCls:'icon-man',
  4. iconAlign:'left'
  5. })

Properties

The properties extend from validatebox, below is the added properties for textbox:

Name Type Description Default
width number The width of the component. auto
height number The height of the component. 22
prompt string The prompt message to be displayed in input box. ''
value string The default value.  
type string The textbox type. Possible values are 'text' and 'password'. text
multiline boolean Defines if this is a multiline textbox. false
editable boolean Defines if user can type text directly into the field. true
disabled boolean Defines if to disable the field. false
readonly boolean Defines if the component is read-only. false
icons array The icons attached to the textbox. Each item has the following properties:
iconCls: string, the icon class.
disabled: boolean, indicate if the icon is disabled.
handler: function, the function to process the clicking action on this icon.

Code example:

$('#tb').textbox({
icons: [{
iconCls:'icon-add',
handler: function(e){
$(e.data.target).textbox('setValue', 'Something added!');
}
},{
iconCls:'icon-remove',
handler: function(e){
$(e.data.target).textbox('clear');
}
}]
})
[]
iconCls string The background icon displayed on the textbox. null
iconAlign string Position of the icons. Possible values are 'left','right'. right
iconWidth number The icon width. 18
buttonText string The displaying text of button that attached to the textbox.  
buttonIcon string The displaying icon of button that attached to the textbox. null
buttonAlign string Position of the button. Possible values are 'left','right'. right

Events

The events extend from validatebox, below is the added events for textbox.

Name Parameters Description
onChange newValue,oldValue Fires when the field value is changed.
onResize width,height Fires when the textbox is resized.
onClickButton none Fires when the user click the button.
onClickIcon index Fires when the user click a icon.

Methods

The methods extend from validatebox, below is the added methods for textbox.

Name Parameter Description
options none Return the options object.
textbox none Return the textbox object. The user can bind any events to this editing box.

Code example:

var t = $('#tt');
t.textbox('textbox').bind('keydown', function(e){
if (e.keyCode == 13){ // when press ENTER key, accept the inputed value.
t.textbox('setValue', $(this).val());
}
});
button none Return the button object.
destroy none Destroy the textbox component.
resize width Resize the component width.
disable none Disable the component.
enable none Enable the component.
readonly mode Enable/Disable readonly mode.

Code example:

$('#tb').textbox('readonly');	// enable readonly mode
$('#tb').textbox('readonly',true); // eanble readonly mode
$('#tb').textbox('readonly',false); // disable readonly mode
clear none Clear the component value.
reset none Reset the component value.
initValue value Initialize the component value. Calling this method does not trigger the 'onChange' event.
setText text Set the displaying text value.
getText none Get the displaying text value.
setValue value Set the component value.
getValue none Get the component value.
getIcon index Get specified icon object.

原文:http://www.jeasyui.com/documentation/index.php#

TextBox 英文文档的更多相关文章

  1. openstack【Kilo】汇总:包括20英文文档、各个组件新增功能及Kilo版部署

    OpenStack Kilo版本发布 20英文文档OpenStack Kilo版本文档汇总:各个操作系统安装部署.配置文档.用户指南等文档 Kilo版部署 openstack[Kilo]入门 [准备篇 ...

  2. py爬取英文文档学习单词

    最近开始看一些整本整本的英文典籍,虽然能看个大概,但是作为四级都没过的我来说还是有些吃力,总还有一部分很关键的单词影响我对句子的理解,因为看的是纸质的,所以查询也很不方便,于是想来个突击,我想把程序单 ...

  3. 英文文档帮查&翻译计划

    以CSDN为首,知乎其次,cnblog带路的一大批博客上充斥着大量低质量的编程入门教程,代码粗制滥造,毫无缩进,没有高亮,东抄西抄.初学者如果长期参照这种垃圾博客来解决问题,将会适得其反,走入歧途. ...

  4. Python3求英文文档中每个单词出现的次数并排序

    [本文出自天外归云的博客园] 题目要求: 1.统计英文文档中每个单词出现的次数. 2.统计结果先按次数降序排序,再按单词首字母降序排序. 3.需要考虑大文件的读取. 我的解法如下: import ch ...

  5. gitlab安装教程、gitlab官网、英文文档

    gitlab官网 https://about.gitlab.com/ gitlab安装和官网英文文档 https://about.gitlab.com/downloads/ 清华大学tuna镜像源 G ...

  6. Android 英文文档下载地址

    通过英文Android API学习Android技术是一个不错选择,当然养鸡的专业户要小心了,以下分享一些下载英文文档的链接(请使用迅雷下载): https://dl-ssl.google.com/a ...

  7. PHP-redis英文文档

    作为程序员,看英文文档是必备技能,所以尽量还是多看英文版的^^ PhpRedis The phpredis extension provides an API for communicating wi ...

  8. python3 怎么统计英文文档常用词?(附解释)

    # coding: utf-8 # In[32]: #import requests #from bs4 import BeautifulSoup #res = requests.get(" ...

  9. 利用谷歌翻译网站和Adobe Acrobat翻译英文文档,且鼠标放置后显示英文原文(无字数限制)(18/12/11更新)

    软件:Adobe Acrobat 网页:https://translate.google.cn/?tr=f&hl=zh-CN 方法:       第一步:用Adobe Acrobat 打开英文 ...

随机推荐

  1. APIO2015简要题解

    这场比赛当初是67(?)反正就是Cu滚粗了…… 先给个题目的传送门:http://wenku.baidu.com/link?url=mUxdsYomenU-e9SFVPacVtXysemiQA4KnP ...

  2. perl reverse 函数

    参考 http://www.perlcn.com/perlbc/perljc/315.html 使用reverse操作符时,perl会先计算变量的值,也就是=右边的值,然后再进行复制,如果revers ...

  3. MVC5-6 帮助类

    视图帮助类 HtmlHelper HtmlHelper给我们封装了大量的常用方法,使我们的开发更具高效.那么其中有哪里是我们常用的呢? BingForm 生成form表单 上图简单的使用了Html.B ...

  4. 使用XmlSerializer序列化可空属性

    使用XmlSerializer可以方便的将对象序列化为xml,实现应用之间的数据交互.但是XmlSerializer却不能很好地序列化类型中的可空字段. 例如,有如下定义的类Person: [Seri ...

  5. python函数基础

    一.基础 函数的定义 def 函数名(参数): ... 函数体 ... 返回值 #如果函数执行完毕也没有return语句时,自动return None. 空函数 如果想定义一个什么事也不做的空函数,可 ...

  6. BZOJ1031: [JSOI2007]字符加密Cipher

    传送门 后缀数组模板题 //BZOJ 1031 //by Cydiater //2016.9.21 #include <iostream> #include <cstring> ...

  7. BZOJ1691: [Usaco2007 Dec]挑剔的美食家

    传送门: 一句话题解:贪心+treap 好几天前刚学的treap,然后真到了考treap又写不出来,这么辣鸡还搞什么OI 先按$A_i$递减排序,然后把$C_i$也递减排序,然后用一个指针指向$M$序 ...

  8. tail 命令 查看Tomcat目录下日志的最后几行的方法

    工作中需要查看日志信息,进行排错,但是面对上万行的错误日志,从头开始往后看,比较浪费时间,所有使用tail命令会节省不少时间. 1.命令   tail  - n  opt/tomcat/logs/ca ...

  9. WinForm------GridControl的部分属性介绍

    参考其它链接: http://www.cnblogs.com/djian/archive/2010/11/19/1881579.html //注意:在定义GridControl里面的FileName里 ...

  10. JAVA第三周课后作业

    JAVA课后作业 一.枚举类型 代码: enum Size{SMALL,MEDIUM,LARGE}; public cl ass EnumTest { public static void main( ...