数值微调器
来源:互联网 发布:php date 取时间 编辑:程序博客网 时间:2024/04/30 06:36
1、用DoJo实现数值微调器
NumberSpinner.html:
<!DOCTYPE html><html><head><meta charset="UTF-8"><title>数值微调器</title><link rel="stylesheet" type="text/css" href="dojoroot/dojo/resources/dojo.css"><link rel="stylesheet" type="text/css" href="dojoroot/dijit/themes/tundra/tundra.css"><script type="text/javascript" src="dojoroot/dojo/dojo.js" djConfig="parseOnLoad:true"></script><style type="text/css"> .form_body{ width:20%; background-color: #CCCCCC; padding: 10px 10px 10px 10px; } label { font-weight: bold; color: #FF0000; }</style><script type="text/javascript"> dojo.require("dojo.parser"); dojo.require("dijit.form.Form"); dojo.require("dijit.form.Button"); dojo.require("dijit.form.NumberSpinner");</script><script type="dojo/method"> dojo.mixin(this,{ reset:function(){ this.setValue(0); } });</script></head><body class="tundra"> <form dojoType="dijit.form.Form" class="form_body"> <label for="number">数值微调器:</label> <input dojoType="dijit.form.NumberSpinner" constraints="{min:-100,max:100}" value=0/> <br/><br/> <label for="numberSpinner">数值微调器:</label> <input dojoType="dijit.form.NumberSpinner" constraints="{min:-100,max:100}" jsId="numberSp" value=0/> <br/><br/> <button dojoType="dijit.form.Button" onclick="numberSp.reset()">重置</button> </form></body></html>
2、运行项目是,Tomcat运行后出现:
七月 10, 2013 12:33:19 上午 org.apache.catalina.core.AprLifecycleListener init严重: An incompatible version 1.1.22 of the APR based Apache Tomcat Native library is installed, while Tomcat requires version 1.1.24七月 10, 2013 12:33:21 上午 org.apache.catalina.core.AprLifecycleListener init严重: An incompatible version 1.1.22 of the APR based Apache Tomcat Native library is installed, while Tomcat requires version 1.1.24七月 10, 2013 12:33:21 上午 org.apache.catalina.core.AprLifecycleListener init严重: An incompatible version 1.1.22 of the APR based Apache Tomcat Native library is installed, while Tomcat requires version 1.1.24七月 10, 2013 12:33:21 上午 org.apache.catalina.core.AprLifecycleListener init严重: An incompatible version 1.1.22 of the APR based Apache Tomcat Native library is installed, while Tomcat requires version 1.1.24七月 10, 2013 12:33:22 上午 org.apache.tomcat.util.digester.SetPropertiesRule begin警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:dojo' did not find a matching property.七月 10, 2013 12:33:22 上午 org.apache.catalina.core.AprLifecycleListener init严重: An incompatible version 1.1.22 of the APR based Apache Tomcat Native library is installed, while Tomcat requires version 1.1.24七月 10, 2013 12:33:23 上午 org.apache.coyote.AbstractProtocol init信息: Initializing ProtocolHandler ["http-bio-8080"]七月 10, 2013 12:33:23 上午 org.apache.coyote.AbstractProtocol init信息: Initializing ProtocolHandler ["ajp-bio-8009"]七月 10, 2013 12:33:23 上午 org.apache.catalina.startup.Catalina load信息: Initialization processed in 5444 ms七月 10, 2013 12:33:23 上午 org.apache.catalina.core.StandardService startInternal信息: Starting service Catalina七月 10, 2013 12:33:23 上午 org.apache.catalina.core.StandardEngine startInternal信息: Starting Servlet Engine: Apache Tomcat/7.0.42七月 10, 2013 12:33:24 上午 org.apache.catalina.util.SessionIdGenerator createSecureRandom信息: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [419] milliseconds.七月 10, 2013 12:33:24 上午 org.apache.coyote.AbstractProtocol start信息: Starting ProtocolHandler ["http-bio-8080"]七月 10, 2013 12:33:24 上午 org.apache.coyote.AbstractProtocol start信息: Starting ProtocolHandler ["ajp-bio-8009"]七月 10, 2013 12:33:24 上午 org.apache.catalina.startup.Catalina start信息: Server startup in 1388 ms
这个是严重警告,对项目运行没有影响,关键之处是把JS和CSS引入的路径弄错了,导致结果显示不出来!
3、运行结果如图所示:
(1)未点击任何按钮
(2)点击上下按钮
(3)点击“重置”按钮
- 数值微调器
- Swift UISteeper(微调器)
- EasyUI 微调器
- 微调
- Swift 之 UIStepper 微调器
- iOS之UIStepper微调器的使用
- Easyui如何修改时间微调器的两个微调按钮的宽度
- QT5 微调器和滑动条的实例
- 微调按钮
- flex 微调
- 微调方向
- pulltorefresh微调
- 微调网络
- Caffe微调
- 微调-模型
- 微调按钮
- 数值比较器
- js数值增长器
- Cracking the coding interview--Q2
- Win7下U盘安装Ubuntu(简易教程)
- Oracle的10046事件跟踪简述
- 索引设计建议
- Effective C++ 读书笔记(9)
- 数值微调器
- poj 1273 Drainage Ditches---EK求最大流
- assert俗称断言,个人认为称有校性校验更准确,这里是它的用法,亲测通过
- cocos2d-x 触摸事件使用笔记
- 孙鑫VC++深入详解:Lesson8 Part3---如何让对话框捕获WM_KEYDOWN消息?
- Cracking the coding interview--Q3
- 一天搞定DXUT三步曲之二:添加文本
- 今天天气不错
- myeclipse编程技巧--中编辑器输入任何字母都出现提示功能