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. while 循环 于 for循环语句

    while 循环 while 循环 while 条件: 如果条件是真的,就继续的循环 如果条件是假的,就停止循环 循环的意思就是让程序重复地执行某些语句,whiler循环就是循环结构的一种,当事先不知 ...

  2. Leetcode #2 Add two number

    Q: You are given two linked lists representing two non-negative numbers. The digits are stored in re ...

  3. 【随笔】mvc使用forms身份验证实现登陆

  4. Jenkins企业版与CloudBees

    Jenkins企业版由CloudBess提供! 参考 https://www.cloudbees.com/ http://www.infoq.com/cn/news/2012/01/cloudbees ...

  5. HDU 2795 Billboard

    Description 在学校的入口处有一个巨大的矩形广告牌,高为h,宽为w.所有种类的广告都可以贴,比如ACM的广告啊,还有餐厅新出了哪些好吃的,等等..   在9月1号这天,广告牌是空的,之后广告 ...

  6. fileinput

    # -*- coding: utf-8 -*- __author__ = 'metasequoia' import fileinput def file_input(): for line in fi ...

  7. [IOS 实现TabBar在Push后的隐藏 以及 两级Tabbar的切换]

    翻了好多网页都没找到资料,自己试了下终于成功了,遂分享一下. 1.实现TabBar在Push后的隐藏 假如结构是这样 NavController->A->B,我们想要实现在A里有Tabba ...

  8. hihocoder #1112 树上的好路径

    时间限制:1000ms单点时限:1000ms内存限制:256MB 描述 现在有一棵有N个带权顶点的树,顶点编号为1,2,...,N.我们定义一条路径的次小(最小)权为它经过的所有顶点(包括起点和终点) ...

  9. C# 生成xml文件

    本篇文章旨在.net环境下生成xml文件,以控制台应用程序为例进行说明. 1.在vs中新建控制台应用程序CreateXml 2.CreateXmlFile:主要生成xml的函数 public void ...

  10. Error=Bias+Variance

    首先 Error = Bias + Variance Error反映的是整个模型的准确度,Bias反映的是模型在样本上的输出与真实值之间的误差,即模型本身的精准度,Variance反映的是模型每一次输 ...