easyui-textbox

TextBox

扩展自 $.fn.validatebox.defaults. 重写 $.fn.textbox.defaults.

TextBox 是加强的输入控件,使我们建设表单更加快捷. 是一些复杂控件的基础控件,比如 combo,datebox,spinner,等等.

id="iframe_0.6925237942934468" src="data:text/html;charset=utf8,%3Cimg%20id=%22img%22%20src=%22http://www.jeasyui.com/documentation/images/textbox.png?_=4368067%22%20style=%22border:none;max-width:848px%22%3E%3Cscript%3Ewindow.onload%20=%20function%20()%20%7Bvar%20img%20=%20document.getElementById('img');%20window.parent.postMessage(%7BiframeId:'iframe_0.6925237942934468',width:img.width,height:img.height%7D,%20'http://www.cnblogs.com');%7D%3C/script%3E" frameborder="0" scrolling="no" style="margin: 0px; padding: 0px; border-width: initial; border-style: none; width: 292px; height: 113px;">

依赖

  • validatebox
  • linkbutton

实例

html创建方式

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

javascript创建方式

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

属性

属性拓展自 validatebox 控件,下面是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

事件

事件拓展自 validatebox 控件,下面是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.

方法

方法拓展自 validatebox 控件,下面是textbox新添加的方法:

Name Parameter Description
options none Return the options object.
textbox none Return the textbox object.
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.
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.

FileBox

拓展自 $.fn.textbox.defaults. 重写 $.fn.filebox.defaults.

由于浏览器安全问题, 一些方法 比如 'setValue' 不能使用filebox 组件.

id="iframe_0.46444635703829973" src="data:text/html;charset=utf8,%3Cimg%20id=%22img%22%20src=%22http://www.jeasyui.com/documentation/images/filebox.png?_=4368067%22%20style=%22border:none;max-width:848px%22%3E%3Cscript%3Ewindow.onload%20=%20function%20()%20%7Bvar%20img%20=%20document.getElementById('img');%20window.parent.postMessage(%7BiframeId:'iframe_0.46444635703829973',width:img.width,height:img.height%7D,%20'http://www.cnblogs.com');%7D%3C/script%3E" frameborder="0" scrolling="no" style="margin: 0px; padding: 0px; border-width: initial; border-style: none; width: 414px; height: 41px;">

依赖

  • textbox

实例

html创建方式

<input class="easyui-filebox" style="width:300px"> 

javascript创建方式

<input id="fb" type="text" style="width:300px">
$('#fb').filebox({ buttonText: 'Choose File', buttonAlign: 'left'
}) 

属性

属性拓展自 textbox, 下面是 filebox新增属性.

Name Type Description Default
buttonText string The displaying text of button that attached to the textbox. Choose File
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

事件

事件拓展自 textbox.

方法

方法拓展自 textbox.

easyui-textbox相关推荐

  1. EasyUI TextBox的onkeypress事件

    EasyUI TextBox的onkeypress事件 关于EasyUI TextBox的事件好像不多,像keypress,keydown在textbox的事件里都没有,所以要用这些事件要采取一些特殊 ...

  2. easyui textbox添加失去焦点事件

    easyui textbox添加失去焦点事件 项目中标题需要添加重复校验,校验不通过只是提示,用户可继续操作,最开始使用的是easyui textbox valitation校验,发现达不到要求,现在 ...

  3. easyui textbox 设置只读不可编辑状态

    在使用easyul的时候,发现输入框内容及不容易获取与设置,用jQuery的方式大部分失效.依稀记得好像是因为easyul会在原页面的基础上,生成了一些新的独有样式,并且暂时覆盖掉使用了easyul的 ...

  4. easyui textbox 隐藏_EasyUI 带清除图标的文本框(TextBox with Clear Icon)_easyui demo

    TextBox with Clear Icon This example shows how to create an textbox with an icon to clear the input ...

  5. Easyui textbox 组件设置css样式

    $("#out_username").textbox('textbox').css("font-size", "14px");//设置字体大 ...

  6. easyui TextBox 回显 换行

    项目遇到一个问题 TextBox 不能回显有换行的数据 把换行数据 aaa bbb ccc 变成了aaabbbccc 网上找了些方法 都不合适 最后自己 设置一个隐藏的textarea通过jquery ...

  7. easyui输入框样式_EasyUI动态改变输入框width

    easyui datagrid 动态改变大小 easyui datagrid 动态改变大小 EasyUi dialog 动态改变窗口大小 我只是需要改变高度,所以我的代码如下:$('#editUnit ...

  8. 服务器临时文件删除bat,删除临时文件的bat文件

    @echo off echo 正在清除系统垃圾文件,请稍等...... del /f /s /q %systemdrive%\*.tmp del /f /s /q %systemdrive%\*._m ...

  9. easyui中调用textbox实现换行的方式

    1.$('#tb').textbox({ multiline : true, 设置multiline : true, 2.修改easyui.css文件: .textbox .textbox-text ...

  10. JS控制文本框只读状态(普通、EasyUI的textbox)

    一.普通文本框 用原生获取DOM元素的方法去获取可以进行改变,但是改用 $('#test') 这种反而不起作用. <body><a>测试:</a><input ...

最新文章

  1. Java中Queue和BlockingQueue的区别
  2. 30万手表推荐_今年六十岁生日,儿子说要送只30万的手表,请问有哪些推荐?...
  3. 《那些年啊,那些事——一个程序员的奋斗史》——35
  4. SpringMVC 集成 mybatisPlus
  5. MSpider爬虫搜索
  6. [转载]百分之百自动登录2345王牌技术员联盟源代码(delphi)
  7. [转载] javascript入门_WebAssembly入门-仅使用14行JavaScript
  8. 倒计时 5 天!Apache Flink Meetup · 北京站,1.13 新版本 x 互娱实践分享的开发者盛筵!...
  9. 夸计算机老师的成语,赞美老师的成语句子
  10. linux终端怎么复制粘贴某一行_超级小白帖:如何在Linux终端中复制粘贴
  11. Ferret 经度范围划定时的方向问题
  12. invalid operands of types‘const char [7]‘and ‘char [32]‘ to binary
  13. 数显之家快讯:【SHIO世硕心语】值得你一读再读《周易》里面最经典的6句话!
  14. 机器翻译领域最重要的论文和学术文献目录清单(清华大学NLP组)
  15. cadence学习资料整理
  16. WEB页面SEO —— 网站TDK优化细节
  17. diffmerge使用
  18. nfc java_android nfc 开发
  19. 计算机头脑风暴知识竞赛PPT,头脑风暴竞头脑 知识竞赛赛知识
  20. iOS证书和描述文件申请详情步骤

热门文章

  1. 技术总结-技术方案模板
  2. rocketMq监控平台界面
  3. TI公司与MSP430单片机
  4. 网络协议-TCP协议详解
  5. TCP/IP协议详解(TCP/IP protocol)
  6. Android+Jquery Mobile学习系列(6)-个人信息设置
  7. 我知道你不知道,我到底知不知道?
  8. vscode的leetcode插件无法账号登陆([ERROR] Login failed. Please make sure the credential is correct)
  9. 测试独立显卡显存好坏的软件,显卡显存测试小软件(Artifact Tester)
  10. 学习过程中所遇到的问题及解决方法总结