创新互联小程序教程:微信小程序基础类库
console
console.log 方法用于在 console 窗口输出信息。它可以接受多个参数,将它们的结果连接起来输出。

十余年的白云鄂网站建设经验,针对设计、前端、开发、售后、文案、推广等六对一服务,响应快,48小时及时工作处理。成都营销网站建设的优势是能够根据用户设备显示端的尺寸不同,自动调整白云鄂建站的显示方式,使网站能够适用不同显示终端,在浏览器中调整网站的宽度,无论在任何一种浏览器上浏览网站,都能展现优雅布局与设计,从而大程度地提升浏览体验。成都创新互联公司从事“白云鄂网站设计”,“白云鄂网站推广”以来,每个客户项目都认真落实执行。
Math
属性
- E
- LN10
- LN2
- LOG2E
- LOG10E
- PI
- SQRT1_2
- SQRT2
以上属性的具体使用请参考 ES5 标准。
方法
- abs
- acos
- asin
- atan
- atan2
- ceil
- cos
- exp
- floor
- log
- max
- min
- pow
- random
- round
- sin
- sqrt
- tan
以上方法的具体使用请参考 ES5 标准。
JSON
方法
- stringify(object): 将 object 对象转换为 JSON 字符串,并返回该字符串。
- parse(string): 将 JSON 字符串转化成对象,并返回该对象。
示例代码:
console.log(undefined === JSON.stringify());
console.log(undefined === JSON.stringify(undefined));
console.log("null"===JSON.stringify(null));
console.log("111"===JSON.stringify(111));
console.log('"111"'===JSON.stringify("111"));
console.log("true"===JSON.stringify(true));
console.log(undefined===JSON.stringify(function(){}));
console.log(undefined===JSON.parse(JSON.stringify()));
console.log(undefined===JSON.parse(JSON.stringify(undefined)));
console.log(null===JSON.parse(JSON.stringify(null)));
console.log(111===JSON.parse(JSON.stringify(111)));
console.log("111"===JSON.parse(JSON.stringify("111")));
console.log(true===JSON.parse(JSON.stringify(true)));
console.log(undefined===JSON.parse(JSON.stringify(function(){})));
Number
属性
- MAX_VALUE
- MIN_VALUE
- NEGATIVE_INFINITY
- POSITIVE_INFINITY
以上属性的具体使用请参考 ES5 标准。
Date
属性
- parse
- UTC
- now
以上属性的具体使用请参考 ES5 标准。
Global
属性
- NaN
- Infinity
- undefined
以上属性的具体使用请参考 ES5 标准。
方法
- parseInt
- parseFloat
- isNaN
- isFinite
- decodeURI
- decodeURIComponent
- encodeURI
- encodeURIComponent
以上方法的具体使用请参考 ES5 标准。
网页标题:创新互联小程序教程:微信小程序基础类库
当前URL:http://www.jxjierui.cn/article/dhgjchc.html


咨询
建站咨询
