w3pop.com :: ÍøÂçѧԺ :: JavaScript :: JSº¯Êý²Î¿¼
The top-level properties and functions can be used on all of the built-in JavaScript objects.
Top-level(¶¥¼¶)ÊôÐԺͺ¯Êý¿ÉÒÔÔÚJSËùÓеÄÄÚ½¨¶ÔÏóÖÐʹÓÃ
FF: Firefox, N: Netscape, IE: Internet Explorer
FF:»ðºü£¬N:Íø¾°£¬IE
| Function º¯Êý |
Description ÃèÊö |
FF | N | IE |
|---|---|---|---|---|
| decodeURI() | Decodes an encoded URI Ϊ¼ÓÃܵÄURI½øÐнâÂë |
1 | 4 | 5.5 |
| decodeURIComponent() | Decodes an encoded URI component Ϊ¼ÓÃܵÄURI×é¼þ½âÂë |
1 | 4 | 5.5 |
| encodeURI() | Encodes a string as a URI ½«×Ö·û´®¼ÓÃÜΪURI |
1 | 4 | 5.5 |
| encodeURIComponent() | Encodes a string as a URI component ½«×Ö·û´®¼ÓÃÜΪURI×é¼þ |
1 | 4 | 5.5 |
| escape() | Encodes a string ¼ÓÃÜÒ»¸ö×Ö·û´® |
1 | - | 3 |
| eval() | Evaluates a string and executes it as if it was script code ÅжÏÒ»¸ö×Ö·û´®²¢½«ÆäÒԽű¾´úÂëµÄÐÎʽִÐÐ |
1 | 2 | 3 |
| isFinite() | Checks if a value is a finite number ¼ì²âÒ»¸öÖµÊÇ·ñΪһ¸öÓÐÏÞÊý×Ö |
1 | 4 | 4 |
| isNaN() | Checks if a value is not a number ¼ì²âÒ»¸öÖµÊÇ·ñ²»ÊÇÒ»¸öÓÐÏÞÊý×Ö |
1 | 2 | 3 |
| Number() | Converts an object's value to a number ½«Ò»¸ö¶ÔÏóµÄֵת»»ÎªÒ»¸öÊý×Ö |
1 | ||
| parseFloat() | Parses a string and returns a floating point number ½«Ò»¸ö×Ö·û´®½âÎöΪһ¸ö¸¡µãÊý×Ö |
1 | 2 | 3 |
| parseInt() | Parses a string and returns an integer ½«Ò»¸ö×Ö·û´®½âÎöΪһ¸öÕûÊý |
1 | 2 | 3 |
| String() | Converts an object's value to a string ½«Ò»¸ö¶ÔÏóֵת»»ÎªÒ»¸ö×Ö·û´® |
1 | ||
| unescape() | Decodes a string encoded by escape() ʹÓÃescape()¶ÔÒ»¸ö×Ö·û´®½øÐнâÂë |
1 | - | 3 |
| Property ÊôÐÔ |
Description ÃèÊö |
FF | N | IE |
|---|---|---|---|---|
| Infinity | A numeric value that represents positive or negative infinity Ö¸¶¨Ò»¸öÕý¸ºÎÞÇî´óµÄÊýÖµ |
1 | 4 | 4 |
| NaN | Indicates that a value is "Not a Number" Ö¸¶¨Ò»¸ö “·ÇÊý×Ö” Öµ |
1 | 4 | 4 |
| undefined | Indicates that a variable has not been assigned a value Ö¸¶¨Ò»¸öδ±»¸³ÖµµÄ±äÁ¿ |
1 | 4 | 5.5 |