新聞中心
這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
創(chuàng)新互聯(lián)百度小程序教程:基礎(chǔ)類庫
- 基礎(chǔ)類庫
- console
- Math
- JSON
- Number
- Date
- Global
- 方法
基礎(chǔ)類庫
以下屬性/方法的具體使用請參考 ES5 標(biāo)準(zhǔn)。
創(chuàng)新互聯(lián)建站是一家專注于網(wǎng)站設(shè)計制作、做網(wǎng)站與策劃設(shè)計,陜西網(wǎng)站建設(shè)哪家好?創(chuàng)新互聯(lián)建站做網(wǎng)站,專注于網(wǎng)站建設(shè)十載,網(wǎng)設(shè)計領(lǐng)域的專業(yè)建站公司;建站業(yè)務(wù)涵蓋:陜西等地區(qū)。陜西做網(wǎng)站價格咨詢:18980820575
console
console.log 方法用于在 console 窗口輸出信息。它可以接受多個參數(shù),將它們的結(jié)果連接起來輸出。
Math
屬性
- E
- LN10
- LN2
- LOG2E
- LOG10E
- PI
- SQRT1_2
- SQRT2
方法
- abs
- acos
- asin
- atan
- atan2
- ceil
- cos
- exp
- floor
- log
- max
- min
- pow
- random
- round
- sin
- sqrt
- tan
JSON
方法
stringify(object): 將 object 對象轉(zhuǎn)換為 JSON 字符串,并返回該字符串。parse(string): 將 JSON 字符串轉(zhuǎn)化成對象,并返回該對象。
代碼示例
在開發(fā)者工具中打開
在開發(fā)者工具中打開
在 WEB IDE 中打開
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(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)));
Number
屬性
- MAX_VALUE
- MIN_VALUE
- NEGATIVE_INFINITY
- POSITIVE_INFINITY
Date
屬性
- parse
- UTC
- now
Global
屬性
- NaN
- Infinity
- undefined
方法
- parseInt
- parseFloat
- isNaN
- isFinite
- decodeURI
- decodeURIComponent
- encodeURI
- encodeURIComponent
分享題目:創(chuàng)新互聯(lián)百度小程序教程:基礎(chǔ)類庫
文章源于:http://www.dlmjj.cn/article/djgheii.html


咨詢
建站咨詢

