ExtJS learning ----------- Ext. Number, ExtJS extension of Number in javascript, extjs Extension

Source: Internet
Author: User

ExtJS learning ----------- Ext. Number, ExtJS extension of Number in javascript, extjs Extension


ExtJS extension of the Number in javascript, you can refer to its help documentation, Documentation: http://download.csdn.net/detail/z1137730824/7748893

The following describes some of the methods:

(1) constrain

Constrain (Number number Number, Number min, Number max): Number

Check whether the given value is within the constraints. If the number is already within the value range, this value is returned. Otherwise, if the value is greater than the maximum value, the maximum value is returned. If the value is smaller than the minimum value, the minimum value is returned ., Otherwise the min or max value is returned depending on which side of the range is note that this method does not change the given value itself. Note that this method returns the constrained value but does not change the current number.

Parameters
  • Number: Number

    Value to be checked

  • Min: Number

    Minimum value of the range

  • Max: Number

    Maximum Value

Returns
  • Number

    The constrained value if outside the range, otherwise the current value

(2) randomInt, which randomly generates a random number in the range

RandomInt (Number from, Number to): Number

Returns a random integer between the specified range (random)

Parameters
  • From: Number

    Lowest value to return.

  • To: Number

    Highst value to return.

(3) toFixed, rounded to the digits after the decimal point of the input value

ToFixed (Number value, Number precision)

Formats a number using fixed-point notation

Parameters
  • Value: Number

    The number to format

  • Precision: Number

    The number of digits to show after the decimal point











Call extjs in javascript

Hi.baidu.com/ext_js
I think you should be very satisfied with this.
Ext. Msg. show ("...");

What is ExtJS? How to learn

I will give you a simple tutorial on getting started. ExtJs is a framework written in js. There are a lot of discussions on it on the Internet.

For more information, see

Onlyaa.com/..2.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.