欧美日韩中文一区二区,亚洲天堂av在线,亚洲最大成人免费视频,欧美最新精品

微信小程序WXS語法基礎類庫

微信小程序WXS語法的基礎類庫有哪些?小編整理分享給大家:

console
console.log 方法用于在 console 窗口輸出信息。它可以接受多個參數,將它們的結果連接起來輸出。

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 標準。


聲明:本站部分文章來源于互聯網,如有侵犯作者著作權,請及時與我們聯系。

木魚小鋪小程序

為您推薦

主站蜘蛛池模板: 闽侯县| 舟曲县| 扶风县| 潍坊市| 元阳县| 高青县| 彝良县| 渝北区| 攀枝花市| 南丹县| 龙里县| 改则县| 凌云县| 绥滨县| 磴口县| 双江| 金昌市| 泉州市| 玉田县| 宝兴县| 东阳市| 沁阳市| 西乡县| 乌兰察布市| 卓资县| 汕头市| 左权县| 元阳县| 连平县| 桑日县| 行唐县| 高碑店市| 滨州市| 武宁县| 宜都市| 临清市| 山阴县| 襄樊市| 林甸县| 成都市| 洪泽县|