Ext. Form. Field. Number numeric input box

Source: Internet
Author: User

1. Main configuration items of Ext. Form. Field. Number

Configuration item Type Description
Allowdecimals Boolean Whether to allow decimals. The default value is true.
Autostripchars Boolean Whether to filter characters that are not allowed. The default value is false.
Basechars String A set of valid numbers. The default value is 0123456789"
Decimalprecision Number The precision of the input number. The default value is to retain the last two digits of the decimal point.
Decimalseparator String Decimal separator. The default value is "."
Maxvalue Number Maximum value that can be input. The default value is number. max_value.
Maxtext String A message is prompted when the input exceeds the maximum value.
Minvalue Number The minimum value that can be input. The default value is number. neative_infinty.
Mintext String Prompt message with input value less than minimum
Nantext String Prompt message after a non-valid value is entered
Negativetext String Error message when the input is negative and the minvalue is set to 0
Step Number Set the number interval when the fine-tuning button is provided to increase or decrease the value. The default value is 1.

2. Ext. Form. Field. Number example

Code:

 <!  Doctype HTML public "-// W3C // dtd xhtml 1.0 transitional // en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"  >  <  Html  Xmlns  = "Http://www.w3.org/1999/xhtml" >  <  Head  Runat  = "Server"  >      <  Title  > Ext. Field. Field. formpanel example </  Title  >      <  Link  Href  = "Ext-4.0.7-gpl/resources/CSS/ext-all.css" REL  = "Stylesheet"  Type  = "Text/CSS"   />      <  Script  SRC  = "Ext-4.0.7-gpl/Bootstrap. js"  Type  = "Text/JavaScript"  > </  Script  >      <  Script Type  = "Text/JavaScript"  >  Ext. onready (  Function  () {Ext. quicktips. INIT ();  VaR  FRM  =   New  Ext. Form. formpanel ({Title: "  Ext. Field. Field. formpanel example  "  , Bodystyle:  "  Padding: 5  "  , Renderto: Ext. getbody (), frame:  True  , Height: 150  , Width:  270  , Defaulttype:  "  Numberfield  "  , Defaults: [{labelseparator:  "  :  " , Labelwidth:  60  , Width:  200  , Labelalign:  "  Left  "  , Magtarget:  "  Side "  }], Items: [{fieldlabel:  "  Integer  "  , Hidetrigger:  True  ,  //  Hide the tune button Allowdecimals:  False  ,  //  Decimal places are not allowed.  Nantext:  "  Enter a valid integer.  "  }, {Fieldlabel:  " Decimal  "  , Decimalprecision:  2  ,  //  Exact two decimal places  Allowdecimals:  True  , Nantext:  " Enter a valid decimal number.  "  }, {Fieldlabel:  "  Number Limit  "  , Basechars:  "  12345  " }, {Fieldlabel:  "  Numerical limit  "  , Maxvalue:  100  ,  //  Maximum Value  Minvalue:  50  //  Minimum value  }]}) ;});  </  Script  >  </  Head  >  <  Body  >  </  Body  > </  Html  > 

:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.