JavaScript function index

Source: Internet
Author: User
Tags acos asin natural logarithm rounds
Keywords: javascript function index math string date
This article Reprinted from http://www.dreamdu.com/javascript/functions_reference/

JavaScript function index

JavaScript Math objects and functions
JavaScript String objects and functions
JavaScript Date objects and functions

JavaScript Math objects and functions

Math Function
Js Code

1. * Math. abs () -- returns the absolute value of a number.
2. * Math. acos () -- returns the arc cosine of a number.
3. * Math. asin () -- returns the arc sine of a number.
4. * Math. atan () -- returns the arc tangent of a number.
5. * Math. atan2 () -- returns the angle (in radians) from the x axis to the point (x, y)
6. * Math. ceil () -- returns the smallest integer greater than or equal to the number parameter (the entire function) and rounds the number up.
7. * Math. cos () -- returns the cosine of a number.
8. * Math. exp () -- returns the x power (exponent) of E (base number of natural logarithm)
9. * Math. floor () -- returns the maximum integer smaller than or equal to the number parameter, and homes the number
10. * Math. log () -- returns the natural logarithm of a number.
11. * Math. max () -- returns a large value from several numbers.
12. * Math. min () -- return a smaller value of several numbers.
13. * Math. Pow () -- return the specified power of the base number
14. * Math. Random () -- returns a pseudo-random number between 0 and 1.
15. * Math. Round () -- returns the nearest integer.
16. * Math. Sin () -- returns the sine of a number.
17. * Math. SQRT () -- returns the square root of a number.
18. * Math. Tan () -- returns the tangent of a number.
19.
20. Math attributes
21.
22. * Math. e attribute -- returns the base number of the natural logarithm. e is approximately 2.718.
23. * Math. ln2 attribute -- returns the natural logarithm loge2 of 2, approximately 0.693
24. * Math. ln10 Property -- returns the natural logarithm loge2 of 10, approximately 2.302
25. * Math. log2e attribute -- returns the base-2 logarithm of E log2e, approximately 1.442
26. * Math. log10e attribute -- returns the base-10 logarithm of E log10e. The greater the value is 0.434.
27. * Math. PI property -- returns the ratio of the circumference of the circle to its diameter (circumference rate π), approximately 3.1415926
28. * Math. sqrt1_2 Property -- returns the square root of 0.5, or the square root of 2 except 1, which is approximately 0.707
29. * Math. sqrt2 Property -- returns the square root of 2, approximately 1.414

* Math. Abs () -- returns the absolute value of a number.
* Math. ACOs () -- returns the arc cosine of a number.
* Math. asin () -- returns the inverse sine of a number.
* Math. atan () -- returns the arc tangent of a number.
* Math. atan2 () -- returns the angle (in radians) from the x axis to the point (x, y)
* Math. ceil () -- returns the smallest integer greater than or equal to the number parameter (the entire function) and rounds the number up.
* Math. cos () -- returns the cosine of a number.
* Math. exp () -- returns the x power (exponent) of E (base number of natural logarithm)
* Math. floor () -- returns the maximum integer smaller than or equal to the number parameter, and homes the number
* Math. log () -- returns the natural logarithm of a number.
* Math. max () -- returns a large value from several numbers.
* Math. min () -- returns a smaller value of several numbers.
* Math. pow () -- returns the specified power of the base number.
* Math. random () -- returns a pseudo-random number between 0 and 1.
* Math. round () -- returns the nearest integer to the number.
* Math. sin () -- returns the sine of a number.
* Math. sqrt () -- returns the square root of a number.
* Math. tan () -- returns the tangent of a number.

Math attributes

* Math. E attribute -- returns the base number of the natural logarithm. E is approximately 2.718.
* Math. LN2 Property -- returns the natural logarithm loge2 of 2, approximately 0.693
* Math. LN10 Property -- returns the natural logarithm loge2 of 10, approximately 2.302
* Math. log2e attribute -- returns the base-2 logarithm of E log2e, which is approximately 1.442
* Math. log10e attribute -- returns the base-10 logarithm of E log10e, which is equal to 0.434
* Math. PI property -- returns the ratio of the circumference of the circle to its diameter (circumference rate π), which is approximately 3.1415926
* Math. sqrt1_2 Property -- returns the square root of 0.5, or the square root of 2 except 1, which is approximately 0.707
* Math. sqrt2 Property -- returns the square root of 2, approximately 1.414

Javascript string objects and functions

JS Code

1. * anchor () function -- returns the anchor whose name attribute is str in the HTML a tag.
2. * big () function -- returns the big font defined by the HTML big tag.
3. * blink () function -- returns a blinking string defined by the html blink tag.
4. * Bold () function -- returns a bold string defined using the html B tag.
5. * charat () function -- returns the character of the specified position (N)
6. * charcodeat () function -- returns the Unicode code of the specified position (n) character
7. * Concat () function -- merges multiple strings and returns the merged result.
8. * fixed () function -- returns the single room distance string defined by the html tt tag.
9. * fontcolor () function -- returns a color string defined by the color attribute in the HTML Font Tag.
10. * fontsize () function -- returns a string of the specified size defined by the size attribute in the HTML Font Tag.
11. * fromcharcode () function -- returns a string consisting of multiple Unicode codes.
12. * indexof () function -- returns the position of substring in string.
13. * italics () function -- returns the Italic string defined using the html I tag
14. * lastindexof () function -- returns the position where substring matches (appears) in string.
15. * Link () function -- returns the link defined using the HTML a tag.
16. * localecompare () function -- use local rules to compare string and string2, and return comparison results
17. * replace () function -- replace oldstr1 in string with newstr2
18. * slice () function -- returns the intercepted string
19. * Small () function -- returns a small font string defined using the HTML small tag
20. * Split () function -- splits the string into a string array and returns this array.
21. * strike () function -- returns a string that defines the strikethrough style using the HTML strike tag.
22. * sub () function -- returns the subscript string defined using the HTML sub tag.
23. * substr () function -- returns the string whose length is length from the position of startpos of string.
24. * substring () function -- returns the string from the startpos position of the string to the endpos position.
25. * SUP () function -- returns the supermark string defined using the HTML sup tag.
26. * toLocaleLowerCase () function -- returns a local lowercase string
27. * toLocaleUpperCase () function -- returns a local uppercase string.
28. * toLowerCase () function -- returns a lowercase string
29. * toUpperCase () function -- returns an uppercase string.

* Anchor () function -- returns the anchor whose name attribute is str in the HTML a tag.
* Big () function -- returns the big font defined by the HTML big tag.
* Blink () function -- returns the blinking string defined by the HTML blink tag.
* Bold () function -- returns a bold string defined using the HTML B tag.
* CharAt () function -- returns the character at the specified position (n)
* CharCodeAt () function -- returns the Unicode code of the specified position (n) character
* Concat () function -- merges multiple strings and returns the merged result.
* Fixed () function -- returns the single-byte string defined by the HTML tt tag.
* Fontcolor () function -- returns a color string defined by the color attribute in the HTML font Tag.
* Fontsize () function -- returns a string of the specified size defined by the size attribute in the HTML font Tag.
* FromCharCode () function -- returns a string consisting of multiple Unicode codes.
* IndexOf () function -- returns the position of the substring in the string.
* Italics () function -- returns an italic string defined using the HTML I tag.
* Lastindexof () function -- returns the position where the substring matches (appears) in the string.
* Link () function -- returns the link defined using the HTML a tag.
* Localecompare () function -- use a local rule to compare string and string2, and return the comparison result.
* Replace () function -- replace oldstr1 in string with newstr2
* Slice () function -- returns the intercepted string
* Small () function -- returns a small font string defined using the HTML small tag.
* Split () function -- Splits a string into a string array and returns this array.
* Strike () function -- returns a string that defines the strikethrough style using the HTML strike tag.
* Sub () function -- returns the subscript string defined using the HTML sub tag.
* Substr () function -- returns the string whose length is length from the position of startpos of the string.
* Substring () function -- returns the string from the string's startpos position to the endpos position.
* SUP () function -- returns the supermark string defined using the HTML sup tag.
* Tolocalelowercase () function -- returns a local lowercase string
* Tolocaleuppercase () function -- returns a local uppercase string
* Tolowercase () function -- returns a lower-case string.
* Touppercase () function -- returns an uppercase string.

Javascript date objects and functions
Js Code

1. * Date () function -- returns the current Date and time
2. * getDate () function -- returns the number of days in the month of the date object (1-31)
3. * getDay () function -- returns the day of the week (0-6) in the date object)
4. * getFullYear () function -- returns the four-digit year in the date object.
5. * getHours () function -- returns the hour (0-23) in the date object)
6. * getMilliseconds () function -- returns the number of milliseconds in the date object (0-999)
7. * getMinutes () function -- returns the number of minutes in the date object (0-59)
8. * getMonth () function -- returns the number of months in the date object (0-11)
9. * getSeconds () function -- returns the number of seconds (0-59) in the date object)
10. * getTime () function -- returns the timestamp representation (expressed in milliseconds) of the date object)
11. * getTimezoneOffset () function -- returns the time difference between the local time and the current date expressed in UTC, in minutes
12. * getUTCDate () function -- returns the Day (1-31) of the month expressed in the World Standard Time (UTC) in the date object)
13. * getUTCDay () function -- returns the day of the week (0-6) represented by the World Standard Time (UTC) in the date object)
14. * getUTCFullYear () function -- returns the four-digit year represented by the World Standard Time (UTC) in the date object.
15. * getutchours () function -- returns the number of hours (0-23) represented by the World Standard Time (UTC) in the date object)

Related Article

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.