Home Dojo Dojo NumberSpinner Button
Questions:Ask|Latest

 
 

Share on Google+Share on Google+

Dojo NumberSpinner Button

Advertisement
In this section, you will learn how to create a NumberSpinner button that increase and decrease the number. Sometime, if you want to directly put the specified range of data.

Dojo NumberSpinner Button

        

In this section, you will learn how to create a NumberSpinner button that increase and decrease the number. Sometime, if you want to directly put the specified range of data. 

Try Online: Number Spinner Button

NumberSpinner : The Number Spinner is a GUI (Graphical User Interface) that makes an integer value is entered in the box easily when small adjustments are required. There are two arrow buttons (down and up) that "spin" the number up and down (increase and decrease). When you hold the up arrow button then increase the number and down arrow button then decrease the number.

Here is the code of Program:

<html>
<head>
<title>Number Spinner Demo</title>
  <style type="text/css">
  @import "../resources/dojo.css";
  @import "../dijit/themes/tundra/tundra.css";
  
  </style>
  <script type="text/javascript" src="dojo.xd.js" djConfig="parseOnLoad: true"></script>
  
  <script type="text/javascript">
  dojo.require("dojo.parser");
  dojo.require("dijit.form.NumberSpinner");
  </script>
</head>
  <body class="tundra">
  <input dojoType="dijit.form.NumberSpinner"
  value="0"
  smallDelta="1"
  constraints="{min:0,max:1550,places:0}"
  maxlength="20"
  id="integerspinner2">
  </body>
</html>

Output of the Program:

If you want to increase the number then click the up arrow:

If you want to decrease the number then click the down arrow:

 

Try Online:

Advertisement

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: November 1, 2008

Related Tutorials

Ask Questions?    Discuss: Dojo NumberSpinner Button   View All Comments

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments
gaurav
December 19, 2011
buttons

want to known different types of buttons to be placed in dojo
DMCA.com