ExtJs之Field.Trigger和Field.Spinner
作文本框功能的。
<!DOCTYPE html>
<html>
<head>
<title>ExtJs</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" type="text/css" href="ExtJs/packages/ext-theme-crisp/build/resources/ext-theme-crisp-all.css">
<script type="text/javascript" src="ExtJs/ext-all.js"></script>
<script type="text/javascript" src="ExtJs/bootstrap.js"></script>
<script type="text/javascript" src="ExtJs/packages/ext-theme-crisp/build/ext-theme-crisp.js"></script>
<script type="text/javascript">
Ext.onReady(function() {
var testForm = new Ext.form.Panel({
title: 'Ext.form.field.Trigger.Sample',
bodyStyle: 'padding: 5 5 5 5',
frame: true,
height: 100,
width: 270,
renderTo: 'form',
defaults: {
labelSeparator: ':',
labelWidth: 70,
width: 200,
labelAlign: 'left'
},
items: [{
xtype: 'triggerfield',
id: 'memo',
fieldLabel: 'triggerfield',
hideTrigger: false,
onTriggerClick: function(){
var memo = testForm.getForm().findField('memo');
alert(memo.getValue());
Ext.getCmp('memo').setValue('test');
}
}]
});
new Ext.form.Panel({
title: 'Ext.form.field.Spinner.Sample',
bodyStyle: 'padding: 5 5 5 5',
frame: true,
height: 70,
width: 250,
renderTo: 'form1',
defaults: {
labelSeparator: ':',
labelWidth: 70,
width: 200,
labelAlign: 'left'
},
items: [{
xtype: 'spinnerfield',
fieldLabel: 'spinnerfiled',
id: 'salary',
value: 100,
onSpinUp: function(){
var salaryCmp = Ext.getCmp('salary');
salaryCmp.setValue(Number(salaryCmp.getValue()) + 2);
},
onSpinDown: function() {
var salaryCmp = Ext.getCmp('salary');
salaryCmp.setValue(Number(salaryCmp.getValue()) - 5);
}
}]
});
});
</script>
</head>
<body>
<div id='form'></div>
<div id='form1'></div>
</body>
</html>

ExtJs之Field.Trigger和Field.Spinner的更多相关文章
- [field:picname/]和[field:litpic/]区别
显示出二级栏目及以下的所有图片(包含三级栏目的) <ul class="incps"> {dede:arclist row=9 col="3" ty ...
- Huge CSV and XML Files in Python, Error: field larger than field limit (131072)
Huge CSV and XML Files in Python January 22, 2009. Filed under python twitter facebook pinterest lin ...
- Lucene.NET中Field.Index 和 Field.Store的几种属性的用法
转载自 http://blog.csdn.net/yja886/article/details/6612069 lucene在doc.add(new Field("content" ...
- [Struts2] No result defined for action ... and result input & Invalid field value for field ...
"No result defined for action ... and result input"错误一般发生在Struts2的拦截器拦截时遇到了问题时.Struts2会将跳转 ...
- android jni ——Field & Method --> Accessing Field
现在我们知道了怎样使用native code访问简单的数据类型和引用参考类型(string,array),下面我们来介绍怎样让jni代码去访问java中的成员变量和成员函数,然后可以再jni中回调ja ...
- 关于能量场和力场弯曲空间的实验证明 EXPERIMENTAL PROOF ON THE BENDING SPACE OF ENERGY FIELD AND FORCE FIELD
前文提到,F = ma, E = mc^2,并且等效是传递的,等效概念具有同属性.所以不止能量,力场也可以弯曲空间. 实验:某人被头顶上方的电站10几万伏的设备吸收,烧毁双臂. (虽然这个实验不应具有 ...
- [Ext JS 4] 实战之 Picker 和 Picker Field
前言 所谓的picker , 就是弹出一个选择框,让你选择一些信息.比如选择日期, 选择颜色等: 选择的结果总是要放在一个地方的,Picker Field 就是用来放置选择结果的一个文本框. 在Ext ...
- 学习EXTJS6(8)基本功能-表单的基础表字段Ext.form.field.Basic
Ext.form.field.Basic是表单字段的基类. Ext.form.field.Text Ext.form.field.TextArea Ext.form.field.Number Ext. ...
- 【转】Django Model field reference学习总结
Django Model field reference学习总结(一) 本文档包含所有字段选项(field options)的内部细节和Django已经提供的field types. Field 选项 ...
随机推荐
- hdu 4027 Can you answer these queries?
题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=4027 Can you answer these queries? Description Proble ...
- 在 Ubuntu 13.10 中搭建Java开发环境 - 懒人版
本文记录我在Ubuntu 13.10中搭建Java开发环境. 本文环境: Ubuntu 13.10 x64运行在Win7下的VMware Workstation 10中. 1. 安装JDK与JRE s ...
- [译]rabbitmq 2.1 Consumers and producers (not an economics lesson)
我对rabbitmq学习还不深入,这些翻译仅仅做资料保存,希望不要误导大家. For now, all you need to know is that producers create messag ...
- ios各种手势,很有意思
转自http://blog.csdn.net/likendsl/article/details/7554150 这哥们很厉害的 一.概述 iPhone中处理触摸屏的操作,在3.2之前是主要使用的是由U ...
- 在线调试js工具网站
http://jsfiddle.net/gh/get/jquery/1.9.1/highslide-software/highcharts.com/tree/master/samples/highch ...
- MongoDB学习笔记-创建、更新、删除文档
创建 MongoDB中使用insert方法来向集合插入文档,然后保存到MongoDB中. db.foo.insert({"hehe":"呵呵"} ...
- SCSF智能客户端学习笔记(一)
什么是智能客户端 要了解智能客户端,首先要认识瘦客户端技术和胖客户端技术各自的优缺点. 对于前者,典型的应用就是使用浏览器,通过输入URL远程访问服务端,并向服务端发送命令,获取服务端的资源,然后在客 ...
- [转]ubuntu错误解决E: Sub-process /usr/bin/dpkg returned an error code (1)
[转]ubuntu错误解决E: Sub-process /usr/bin/dpkg returned an error code (1) http://yanue.net/post-123.html ...
- 37.altium designer中的class和rules?
在布局布线工程中,遇到复杂工程时,难免要进行class和rules的设置,经过试验证明,class和rules的子目录是有优先级的.
- python学习笔记1
python3.3使用urllib2报错 no module named urllib2,原因是python3中将urllib2换成了request. 所以要使用import urllib.reque ...