zoukankan      html  css  js  c++  java
  • 数值微调器

    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{
          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/>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <button dojoType="dijit.form.Button" οnclick="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)点击“重置”按钮


  • 相关阅读:
    百度网盘提交提取密码:根据cookies获取loginId 的js
    javaScript 中的私有,共有,特权属性和方法
    centos7 设置时区和时间
    centos 7 su jenkins 切换不过去
    在宿主机查看docker使用cpu、内存、网络、io情况
    Centos6.8通过yum安装mysql5.7 centos7.5适用
    docker-compose 安装redis sentinel,共享主机网络模式
    spring boot通过Interceptor和HandlerMethodReturnValueHandler实现统一处理为controller返回对象统计处理时间
    centos 7.5安装docker-CE 18
    centos查看系统版本信息
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13315779.html
Copyright © 2011-2022 走看看