JS中不為人知的五種聲明Number的方式簡(jiǎn)要概述
更新時(shí)間:2013年02月22日 10:29:26 作者:
聲明一個(gè)數(shù)值類型的變量我看到三種;我嘴角微微一笑:少年你還嫩了點(diǎn),哪止三種,我知道的至少有五種,好奇的你可以參考下哈,希望本文可以幫助到你
跟小組里一自稱小方方的賣萌90小青年聊天,IT男的壞習(xí)慣,聊著聊著就扯到技術(shù)上去了,小方方突然問(wèn)
1、聲明一個(gè)數(shù)值類型的變量我看到三種,區(qū)別在哪:
var num = 123; //方式一
var num = Number(123);
var num = new Number(123);
2、方式一明明是個(gè)數(shù)字字面量,為毛平常我們可以直接在上面調(diào)用各種方法,如下:
var num = 123;
console.log(num.toString());
我嘴角微微一笑:少年你還嫩了點(diǎn),哪止三種,我知道的至少有五種!!
笑著笑著嘴角開(kāi)始抽搐,額角開(kāi)始冒出了冷汗:至少有五種,沒(méi)錯(cuò),但是。。。區(qū)別在哪。。。
懷著老菜鳥(niǎo)特有的矜持和驕傲,我不屑地說(shuō):這都不知道,自己查資料去。。。轉(zhuǎn)過(guò)身,開(kāi)始翻ECMAS - 262(第五版)
一、五種聲明數(shù)值類型變量的方式
//方式一:最常見(jiàn)的方式,通過(guò)數(shù)字字面量方式聲明
var num = 123;
//方式二:偶爾使用方式,大部分情況下是將字符串轉(zhuǎn)成數(shù)字
var num = Number(123);
//方式三:很少使用,各神書(shū),包括犀牛書(shū),都將其列入不推薦方式
var num = new Number(123);
//方式四:神方式,目前還沒(méi)見(jiàn)過(guò)人使用
var num = new Object(123);
//方式五:更離奇,更詭異
var num = Object(123);
可以看到,在上5種聲明方式種,方式一不用怎么說(shuō)了,平常都是這樣用的;方式三 to 方式五屬于比較的使用,下文會(huì)分別說(shuō)明:
1.五種聲明方式的區(qū)別?當(dāng)你用顫巍巍的手指敲下代碼后,究竟發(fā)生了神馬?
2.方式一聲明的明明不是對(duì)象,但為什么平常我們可以在上面調(diào)用方法,如toString等?
二、各種聲明方式之間的區(qū)別
方式一:var num = 123;
EC5說(shuō)明:
A numeric literal stands for a value of the Number type. This value is determined in two steps: first, a mathematical value (MV) is derived from the literal; second, this mathematical value is rounded as described below
//.....個(gè)人總結(jié)摘要:
1.解析變量的值,比如說(shuō)取出整數(shù)部分、小數(shù)部分等,因?yàn)閿?shù)字聲明方式還可以為num = .123,num = 123e4等形式
2.對(duì)解析出來(lái)的值取近似值,比如num = 123.33333333333333...3333333333333333333333333....,這個(gè)時(shí)候就要取近似值了,具體取近似則規(guī)則不展開(kāi)
3.此種方式聲明的變量,只是個(gè)簡(jiǎn)單的數(shù)字字面量,并不是對(duì)象(至于為什么可以在上面調(diào)用toString等方法,后文講解)
方式二:var num = Number(123);
EC5說(shuō)明:
15.7.1 The Number Constructor Called as a Function
When Number is called as a function rather than as a constructor, it performs a type conversion. 15.7.1.1 Number ( [ value ] )
Returns a Number value (not a Number object) computed by ToNumber(value) if value was supplied, else returns +0.個(gè)人總結(jié)摘要:
1.此處只是將Number當(dāng)作一個(gè)普通的函數(shù)來(lái)調(diào)用,而不是構(gòu)造方法,因此返回的不是對(duì)象,而是一個(gè)簡(jiǎn)單的數(shù)值
2.本質(zhì)與方式一相同;相對(duì)于方式一的區(qū)別在于,需要針對(duì)傳入?yún)?shù)的類型,執(zhí)行不同的類型轉(zhuǎn)換過(guò)程,試圖將參數(shù)解析成對(duì)應(yīng)的數(shù)值,具體規(guī)則如下:
方式三:var num = new Number(123);
EC5說(shuō)明:
15.7.2 The Number Constructor
When Number is called as part of a new expression it is a constructor: it initialises the newly created object. 15.7.2.1 new Number ( [ value ] )
The [[Prototype]] internal property of the newly constructed object is set to the original Number prototype object, the one that is the initial value of Number.prototype (15.7.3.1).
The [[Class]] internal property of the newly constructed object is set to "Number".
The [[PrimitiveValue]] internal property of the newly constructed object is set to ToNumber(value) if value was
supplied, else to +0.
The [[Extensible]] internal property of the newly constructed object is set to true.個(gè)人總結(jié)摘要:
1.此處將Number作用構(gòu)造方法調(diào)用,返回的是Number類型的對(duì)象,該對(duì)象能夠訪問(wèn)Number的原型屬性以及方法;這樣說(shuō)可能有些迷惑,后面會(huì)說(shuō)到
var num = new Number(123);
console.log(typeof num); //輸出:object
console.log(Object.prototype.toString.call(num)); //輸出:[object Number]
3.返回的Number類型對(duì)象內(nèi)部的原始值( [[PrimitiveValue]]),為經(jīng)過(guò)類型轉(zhuǎn)換后獲得的數(shù)字值,具體轉(zhuǎn)換規(guī)則與方式二提到的一致
方式四:var num = new Object(123);
EC5說(shuō)明:
15.2.2 The Object Constructor
When Object is called as part of a new expression, it is a constructor that may create an object.
15.2.2.1 new Object ( [ value ] )
When the Object constructor is called with no arguments or with one argument value, the following steps are taken:
1.If value is supplied, then
a. If Type(value) is Object, then
1.If the value is a native ECMAScript object, do not create a new object but simply return value.
2.If the value is a host object, then actions are taken and a result is returned in an implementation-dependent manner that may depend on the host object.
b. If Type(value) is String, return ToObject(value).
c. If Type(value) is Boolean, return ToObject(value).
d. If Type(value) is Number, return ToObject(value).
2.Assert: The argument value was not supplied or its type was Null or Undefined.
3.Let obj be a newly created native ECMAScript object.
4.Set the [[Prototype]] internal property of obj to the standard built-in Object prototype object (15.2.4).
5.Set the [[Class]] internal property of obj to "Object".
6.Set the [[Extensible]] internal property of obj to true.
7.Set all the internal methods of obj as specified in 8.12.
8.Return obj.
個(gè)人理解說(shuō)明:
上面洋洋灑灑的貼了好多文字,可能看著有些頭疼,因?yàn)橥ㄟ^(guò) new Object(param) 這種方式聲明變量,根據(jù)傳入?yún)?shù)具體類型的不同,得到的結(jié)果也會(huì)有區(qū)別,比如說(shuō)數(shù)據(jù)類型。這里面具體轉(zhuǎn)換的規(guī)則,可以忽略不計(jì),我們只看我們目前關(guān)系的部分,即上面標(biāo)紅色的文字,要點(diǎn)有:
1.傳遞了參數(shù),且參數(shù)是一個(gè)數(shù)字,則創(chuàng)建并返回一個(gè)Number類型的對(duì)象 —— 沒(méi)錯(cuò),其實(shí)等同于方式三
2.該Number對(duì)象的值等于傳入的參數(shù),內(nèi)部的[[prototype]]屬性指向Number.prototype
方式五:var num = Object(123);
EC5說(shuō)明:
15.2.1 The Object Constructor Called as a Function
When Object is called as a function rather than as a constructor, it performs a type conversion.
15.2.1.1 Object ( [ value ] )
When the Object function is called with no arguments or with one argument value, the following steps are taken:
1.If value is null, undefined or not supplied, create and return a new Object object exactly as if the standard built-in Object constructor had been called with the same arguments (15.2.2.1).
2.Return ToObject(value).
個(gè)人理解說(shuō)明:
1.當(dāng)傳入的參數(shù)為空、undefined或null時(shí),等同于 new Object(param),param為用戶傳入的參數(shù)
2.否則,返回一個(gè)對(duì)象,至于具體轉(zhuǎn)換成的對(duì)象類型,可參見(jiàn)下表;具體到上面的例子,本質(zhì)等同于new Number(123):
3. 簡(jiǎn)單測(cè)試用例
var num = Object(123);
console.log(typeof num); //輸出:object console.log(Object.prototype.toString.call(num)); //輸出:[object Number]
三、var num = 123; 與 var num = new Number(123);
各位先賢哲們告誡我們最好用第一種方式,理由成分,擲地有聲:效率低,eval(num)的時(shí)候可能有意外的情況發(fā)生。。。巴拉巴拉
拋開(kāi)上面的雜音,我們這里要關(guān)注的是,為什么下面的語(yǔ)句不會(huì)出錯(cuò):
var num = 123;
console.log(num.toString(num)); //輸出:'123',竟然沒(méi)出錯(cuò)
不是說(shuō)字面量方式聲明的只是普通的數(shù)值類型,不是對(duì)象嗎?但不是對(duì)象哪來(lái)的toString方法調(diào)用,這不科學(xué)!
好吧,查了下犀牛書(shū),找到了答案:
當(dāng)用戶通過(guò)字面量方式聲明一個(gè)變量,并在該變量上調(diào)用如toString等方法,JS腳本引擎會(huì)偷偷地創(chuàng)建該變量對(duì)應(yīng)的包裝對(duì)象,并在該對(duì)象上調(diào)用對(duì)應(yīng)的方法;當(dāng)調(diào)用結(jié)束,則銷毀該對(duì)象;這個(gè)過(guò)程對(duì)于用戶來(lái)說(shuō)是不可見(jiàn)的,因此不少初學(xué)者會(huì)有這方面的困惑。
好吧,我承認(rèn)上面這段話并不是原文內(nèi)容,只是個(gè)人對(duì)犀牛書(shū)對(duì)應(yīng)段落的理解,為了顯得更加專業(yè)權(quán)威故意加了引用標(biāo)識(shí)。。。上面舉的那個(gè)例子,可以簡(jiǎn)單看作下面過(guò)程:
var num = 123;
var tmp = num;
num = new Number(num);
console.log(num.toString(num));
num = tmp;
(因?yàn)樽蛲矸?guī)范翻到快1點(diǎn),實(shí)在困的不行,就偷懶了,相信犀牛書(shū)不會(huì)坑我)
四、寫在后面
Javascript的變量聲明方式、類型判斷等,一直都覺(jué)得無(wú)力吐槽,上面的內(nèi)容對(duì)于初學(xué)者來(lái)說(shuō),無(wú)異于毀三觀;即使對(duì)于像本人這樣已經(jīng)跟Javascript廝守了兩年多的老菜鳥(niǎo),經(jīng)常也被弄得稀里糊涂
簡(jiǎn)單總結(jié)一下:
1.方式一、方式二本質(zhì)相同
2.方式三、方式四、方式五本質(zhì)相同
最后的最后:
文中示例如有錯(cuò)漏,請(qǐng)指出;如覺(jué)得文章對(duì)您有用,可點(diǎn)擊“推薦” :)
1、聲明一個(gè)數(shù)值類型的變量我看到三種,區(qū)別在哪:
復(fù)制代碼 代碼如下:
var num = 123; //方式一
var num = Number(123);
var num = new Number(123);
2、方式一明明是個(gè)數(shù)字字面量,為毛平常我們可以直接在上面調(diào)用各種方法,如下:
復(fù)制代碼 代碼如下:
var num = 123;
console.log(num.toString());
我嘴角微微一笑:少年你還嫩了點(diǎn),哪止三種,我知道的至少有五種!!
笑著笑著嘴角開(kāi)始抽搐,額角開(kāi)始冒出了冷汗:至少有五種,沒(méi)錯(cuò),但是。。。區(qū)別在哪。。。
懷著老菜鳥(niǎo)特有的矜持和驕傲,我不屑地說(shuō):這都不知道,自己查資料去。。。轉(zhuǎn)過(guò)身,開(kāi)始翻ECMAS - 262(第五版)
一、五種聲明數(shù)值類型變量的方式
復(fù)制代碼 代碼如下:
//方式一:最常見(jiàn)的方式,通過(guò)數(shù)字字面量方式聲明
var num = 123;
//方式二:偶爾使用方式,大部分情況下是將字符串轉(zhuǎn)成數(shù)字
var num = Number(123);
//方式三:很少使用,各神書(shū),包括犀牛書(shū),都將其列入不推薦方式
var num = new Number(123);
//方式四:神方式,目前還沒(méi)見(jiàn)過(guò)人使用
var num = new Object(123);
//方式五:更離奇,更詭異
var num = Object(123);
可以看到,在上5種聲明方式種,方式一不用怎么說(shuō)了,平常都是這樣用的;方式三 to 方式五屬于比較的使用,下文會(huì)分別說(shuō)明:
1.五種聲明方式的區(qū)別?當(dāng)你用顫巍巍的手指敲下代碼后,究竟發(fā)生了神馬?
2.方式一聲明的明明不是對(duì)象,但為什么平常我們可以在上面調(diào)用方法,如toString等?
二、各種聲明方式之間的區(qū)別
方式一:var num = 123;
EC5說(shuō)明:
A numeric literal stands for a value of the Number type. This value is determined in two steps: first, a mathematical value (MV) is derived from the literal; second, this mathematical value is rounded as described below
//.....個(gè)人總結(jié)摘要:
1.解析變量的值,比如說(shuō)取出整數(shù)部分、小數(shù)部分等,因?yàn)閿?shù)字聲明方式還可以為num = .123,num = 123e4等形式
2.對(duì)解析出來(lái)的值取近似值,比如num = 123.33333333333333...3333333333333333333333333....,這個(gè)時(shí)候就要取近似值了,具體取近似則規(guī)則不展開(kāi)
3.此種方式聲明的變量,只是個(gè)簡(jiǎn)單的數(shù)字字面量,并不是對(duì)象(至于為什么可以在上面調(diào)用toString等方法,后文講解)
方式二:var num = Number(123);
EC5說(shuō)明:
15.7.1 The Number Constructor Called as a Function
When Number is called as a function rather than as a constructor, it performs a type conversion. 15.7.1.1 Number ( [ value ] )
Returns a Number value (not a Number object) computed by ToNumber(value) if value was supplied, else returns +0.個(gè)人總結(jié)摘要:
1.此處只是將Number當(dāng)作一個(gè)普通的函數(shù)來(lái)調(diào)用,而不是構(gòu)造方法,因此返回的不是對(duì)象,而是一個(gè)簡(jiǎn)單的數(shù)值
2.本質(zhì)與方式一相同;相對(duì)于方式一的區(qū)別在于,需要針對(duì)傳入?yún)?shù)的類型,執(zhí)行不同的類型轉(zhuǎn)換過(guò)程,試圖將參數(shù)解析成對(duì)應(yīng)的數(shù)值,具體規(guī)則如下:
方式三:var num = new Number(123);
EC5說(shuō)明:
15.7.2 The Number Constructor
When Number is called as part of a new expression it is a constructor: it initialises the newly created object. 15.7.2.1 new Number ( [ value ] )
The [[Prototype]] internal property of the newly constructed object is set to the original Number prototype object, the one that is the initial value of Number.prototype (15.7.3.1).
The [[Class]] internal property of the newly constructed object is set to "Number".
The [[PrimitiveValue]] internal property of the newly constructed object is set to ToNumber(value) if value was
supplied, else to +0.
The [[Extensible]] internal property of the newly constructed object is set to true.個(gè)人總結(jié)摘要:
1.此處將Number作用構(gòu)造方法調(diào)用,返回的是Number類型的對(duì)象,該對(duì)象能夠訪問(wèn)Number的原型屬性以及方法;這樣說(shuō)可能有些迷惑,后面會(huì)說(shuō)到
復(fù)制代碼 代碼如下:
var num = new Number(123);
console.log(typeof num); //輸出:object
console.log(Object.prototype.toString.call(num)); //輸出:[object Number]
3.返回的Number類型對(duì)象內(nèi)部的原始值( [[PrimitiveValue]]),為經(jīng)過(guò)類型轉(zhuǎn)換后獲得的數(shù)字值,具體轉(zhuǎn)換規(guī)則與方式二提到的一致
方式四:var num = new Object(123);
EC5說(shuō)明:
15.2.2 The Object Constructor
When Object is called as part of a new expression, it is a constructor that may create an object.
15.2.2.1 new Object ( [ value ] )
When the Object constructor is called with no arguments or with one argument value, the following steps are taken:
1.If value is supplied, then
a. If Type(value) is Object, then
1.If the value is a native ECMAScript object, do not create a new object but simply return value.
2.If the value is a host object, then actions are taken and a result is returned in an implementation-dependent manner that may depend on the host object.
b. If Type(value) is String, return ToObject(value).
c. If Type(value) is Boolean, return ToObject(value).
d. If Type(value) is Number, return ToObject(value).
2.Assert: The argument value was not supplied or its type was Null or Undefined.
3.Let obj be a newly created native ECMAScript object.
4.Set the [[Prototype]] internal property of obj to the standard built-in Object prototype object (15.2.4).
5.Set the [[Class]] internal property of obj to "Object".
6.Set the [[Extensible]] internal property of obj to true.
7.Set all the internal methods of obj as specified in 8.12.
8.Return obj.
個(gè)人理解說(shuō)明:
上面洋洋灑灑的貼了好多文字,可能看著有些頭疼,因?yàn)橥ㄟ^(guò) new Object(param) 這種方式聲明變量,根據(jù)傳入?yún)?shù)具體類型的不同,得到的結(jié)果也會(huì)有區(qū)別,比如說(shuō)數(shù)據(jù)類型。這里面具體轉(zhuǎn)換的規(guī)則,可以忽略不計(jì),我們只看我們目前關(guān)系的部分,即上面標(biāo)紅色的文字,要點(diǎn)有:
1.傳遞了參數(shù),且參數(shù)是一個(gè)數(shù)字,則創(chuàng)建并返回一個(gè)Number類型的對(duì)象 —— 沒(méi)錯(cuò),其實(shí)等同于方式三
2.該Number對(duì)象的值等于傳入的參數(shù),內(nèi)部的[[prototype]]屬性指向Number.prototype
方式五:var num = Object(123);
EC5說(shuō)明:
15.2.1 The Object Constructor Called as a Function
When Object is called as a function rather than as a constructor, it performs a type conversion.
15.2.1.1 Object ( [ value ] )
When the Object function is called with no arguments or with one argument value, the following steps are taken:
1.If value is null, undefined or not supplied, create and return a new Object object exactly as if the standard built-in Object constructor had been called with the same arguments (15.2.2.1).
2.Return ToObject(value).
個(gè)人理解說(shuō)明:
1.當(dāng)傳入的參數(shù)為空、undefined或null時(shí),等同于 new Object(param),param為用戶傳入的參數(shù)
2.否則,返回一個(gè)對(duì)象,至于具體轉(zhuǎn)換成的對(duì)象類型,可參見(jiàn)下表;具體到上面的例子,本質(zhì)等同于new Number(123):
3. 簡(jiǎn)單測(cè)試用例
復(fù)制代碼 代碼如下:
var num = Object(123);
console.log(typeof num); //輸出:object console.log(Object.prototype.toString.call(num)); //輸出:[object Number]
三、var num = 123; 與 var num = new Number(123);
各位先賢哲們告誡我們最好用第一種方式,理由成分,擲地有聲:效率低,eval(num)的時(shí)候可能有意外的情況發(fā)生。。。巴拉巴拉
拋開(kāi)上面的雜音,我們這里要關(guān)注的是,為什么下面的語(yǔ)句不會(huì)出錯(cuò):
復(fù)制代碼 代碼如下:
var num = 123;
console.log(num.toString(num)); //輸出:'123',竟然沒(méi)出錯(cuò)
不是說(shuō)字面量方式聲明的只是普通的數(shù)值類型,不是對(duì)象嗎?但不是對(duì)象哪來(lái)的toString方法調(diào)用,這不科學(xué)!
好吧,查了下犀牛書(shū),找到了答案:
當(dāng)用戶通過(guò)字面量方式聲明一個(gè)變量,并在該變量上調(diào)用如toString等方法,JS腳本引擎會(huì)偷偷地創(chuàng)建該變量對(duì)應(yīng)的包裝對(duì)象,并在該對(duì)象上調(diào)用對(duì)應(yīng)的方法;當(dāng)調(diào)用結(jié)束,則銷毀該對(duì)象;這個(gè)過(guò)程對(duì)于用戶來(lái)說(shuō)是不可見(jiàn)的,因此不少初學(xué)者會(huì)有這方面的困惑。
好吧,我承認(rèn)上面這段話并不是原文內(nèi)容,只是個(gè)人對(duì)犀牛書(shū)對(duì)應(yīng)段落的理解,為了顯得更加專業(yè)權(quán)威故意加了引用標(biāo)識(shí)。。。上面舉的那個(gè)例子,可以簡(jiǎn)單看作下面過(guò)程:
復(fù)制代碼 代碼如下:
var num = 123;
var tmp = num;
num = new Number(num);
console.log(num.toString(num));
num = tmp;
(因?yàn)樽蛲矸?guī)范翻到快1點(diǎn),實(shí)在困的不行,就偷懶了,相信犀牛書(shū)不會(huì)坑我)
四、寫在后面
Javascript的變量聲明方式、類型判斷等,一直都覺(jué)得無(wú)力吐槽,上面的內(nèi)容對(duì)于初學(xué)者來(lái)說(shuō),無(wú)異于毀三觀;即使對(duì)于像本人這樣已經(jīng)跟Javascript廝守了兩年多的老菜鳥(niǎo),經(jīng)常也被弄得稀里糊涂
簡(jiǎn)單總結(jié)一下:
1.方式一、方式二本質(zhì)相同
2.方式三、方式四、方式五本質(zhì)相同
最后的最后:
文中示例如有錯(cuò)漏,請(qǐng)指出;如覺(jué)得文章對(duì)您有用,可點(diǎn)擊“推薦” :)
您可能感興趣的文章:
- javascript FormatNumber函數(shù)實(shí)現(xiàn)方法
- javascript parseInt與Number函數(shù)的區(qū)別
- Javascript Boolean、Nnumber、String 強(qiáng)制類型轉(zhuǎn)換的區(qū)別詳細(xì)介紹
- Extjs NumberField后面加單位實(shí)現(xiàn)思路
- js類型轉(zhuǎn)換與引用類型詳解(Boolean_Number_String)
- js中將String轉(zhuǎn)換為number以便比較
- JavaScript中的object轉(zhuǎn)換成number或string規(guī)則介紹
- JavaScript中string轉(zhuǎn)換成number介紹
- JavaScript中number轉(zhuǎn)換成string介紹
- Javascript之Number對(duì)象介紹
相關(guān)文章
js實(shí)現(xiàn)的下拉框二級(jí)聯(lián)動(dòng)效果
這篇文章主要介紹了js實(shí)現(xiàn)的下拉框二級(jí)聯(lián)動(dòng)效果,涉及JavaScript針對(duì)頁(yè)面元素的遍歷與節(jié)點(diǎn)操作相關(guān)技巧,需要的朋友可以參考下2016-04-04
javascript中的Function.prototye.bind
這篇文章主要介紹了javascript中的Function.prototye.bind的相關(guān)資料,需要的朋友可以參考下2015-06-06
JavaScript解析任意形式的json樹(shù)型結(jié)構(gòu)展示
這篇文章主要介紹了JavaScript解析任意形式的json樹(shù)型結(jié)構(gòu)展示的相關(guān)資料,需要的朋友可以參考下2017-07-07
js+div實(shí)現(xiàn)文字滾動(dòng)和圖片切換效果代碼
這篇文章主要介紹了js+div實(shí)現(xiàn)文字滾動(dòng)和圖片切換效果代碼,涉及javascript鼠標(biāo)事件及頁(yè)面元素圖片滾動(dòng)效果實(shí)現(xiàn)技巧,具有一定參考借鑒價(jià)值,需要的朋友可以參考下2015-08-08
vue使用vue-quill-editor富文本編輯器且將圖片上傳到服務(wù)器的功能
這篇文章主要介紹了vue使用vue-quill-editor富文本編輯器且將圖片上傳到服務(wù)器的功能,本文通過(guò)實(shí)例代碼給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2021-01-01
JS獲取當(dāng)前時(shí)間戳與時(shí)間戳轉(zhuǎn)日期時(shí)間格式問(wèn)題
這篇文章主要介紹了JS獲取當(dāng)前時(shí)間戳與時(shí)間戳轉(zhuǎn)日期時(shí)間格式,本文結(jié)合實(shí)例代碼給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2023-01-01

