JavaScript 全局属性和方法可与所有 JavaScript 对象一起使用。
Name | Description |
---|---|
decodeURI() | Decodes a URI |
decodeURI Component() |
Decodes a URI component |
encodeURI() | Encodes a URI |
encodeURI Component() |
Encodes a URI component |
escape() | Deprecated. Use instead: encodeURI() encodeURIComponent() |
eval() | Evaluates a string and executes it as if it was script code |
Infinity | A numeric value that represents positive/negative infinity |
isFinite() | Determines whether a value is a finite, legal number |
isNaN() | Determines whether a value is an illegal number |
NaN | "Not-a-Number" value |
Number() | Converts an object's value to a number |
parseFloat() | Parses a string and returns a floating point number |
parseInt() | Parses a string and returns an integer |
String() | Converts an object's value to a string |
undefined | Indicates that a variable has not been assigned a value |
unescape() | Deprecated. Use instead: decodeURI() decodeURIComponent() |
由于这些方法是全局的,而全局的对象是浏览器窗口,因此这些方法实际上是窗口方法:
isNaN() 与 window.isNaN() 相同。
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!