Home > Web Front-end > JS Tutorial > body text

JavaScript common global attributes and method records accumulation_Basic knowledge

WBOY
Release: 2016-05-16 17:30:26
Original
1071 people have browsed it

Recently, I am learning JavaScript. The Java scope chain includes the global world. Recording the commonly used global properties and methods is regarded as the accumulation of knowledge. Not all are listed. If you want to view them all, you can refer to the JS-related API documentation.

Commonly used global attributes:

全局属性      作用                             
Infinity 表示正无穷大的数值
NaN 非数字值 
undefined 未定义的值

Commonly used global methods:
 全局方法      作用                             
encodeURI() 返回参数的副本,其中某些字符被十六进制的转义序列替换, 建议使用encodeURIComponent()
encodeURIComponent() 返回参数的副本,其中某些字符被十六进制的转义序列替换
decodeURI() 对encodeURI()转义的字符串解码
decodeURIComponent() 对encodeURIComponent()转义的字符串解码
escape() 用转义序列替换某些字符来字符串编码
unescape() 对用escape()编码的字符串解码
eval()  计算Javascript代码串,返回结果
isFinite() 检验一个值是否是无穷大的数字
isNaN()  检验一个值是否是非数字的值
parseInt() 从字符串解析一个整数
parseFloat() 从字符串解析一个小数
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template