欧美日韩中文一区二区,亚洲天堂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 標準。


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

木魚小鋪小程序

為您推薦

主站蜘蛛池模板: 临邑县| 从化市| 谷城县| 漯河市| 陈巴尔虎旗| 无为县| 宁远县| 汉中市| 南安市| 边坝县| 兰考县| 洛南县| 自贡市| 乌兰浩特市| 阿克陶县| 法库县| 高安市| 涡阳县| 乌苏市| 克东县| 章丘市| 尤溪县| 商南县| 澄迈县| 三门县| 百色市| 维西| 沂源县| 密云县| 固镇县| 黄大仙区| 延安市| 甘德县| 武威市| 施甸县| 嘉黎县| 襄城县| 维西| 米易县| 呼伦贝尔市| 巴楚县|