jQuery中的幾個模塊總結

Query插件,以備并希望在前端方面有所長進。請批評指正。

一,類型判斷全解

JQuery判斷類型擴展方法:$.type()

1 /*type: function( obj ) {
2             if ( obj == null ) {
3                 return obj + "";
4             }            
5             return typeof obj === "object" || typeof obj === "function" ?
6                 class2type[ toString.call(obj) ] || "object" :
7                 typeof obj;
8         }*/
$.type()

本質:就是運用{}.toString.call()或者(Object.prototype.toString.call())。

自己模仿寫出來一個方法:

1 function getType(o) {
2             var _target;
3             return (
4                 (_target = typeof (o)) == "object" ? Object.prototype.toString.call(o).slice(8, -1) : _target)
5                 .toLowerCase();
6         }
getType

但這個方法只是判斷繼承Object復雜類型下的Date Array RegExp等typeof判斷不出的子類型。

1,typeof 2,instanceof 3,constructor 4,{}.toString.call()或者(Object.prototype.toString.call())

Boolean Number String Function Array Date RegExp Object Error Null Undefined

 1         //1,數據類型:5種簡單基本類型:Undefined Boolean String Number Null 1種復雜類型Object
 2         //2,但根據返回值得到的類型有6種,“undefined” “boolean” “string” “number” “function” “object”。注意將Null去掉,換成“function”。都以小寫字母開頭
 3         //比如操作符操作字符串會返回上面6種,注意一點:將typeof null會返回“object”,注意返回object的表示這個值是對象(包括Array)或者null,
 4         //1Array Date返回object 2Math 數字返回number 3字符串new返回object 直接定義返回object
 5         var arr1 = [1, 2, 3];
 6         var arr2 = new Array()
 7         var dat = new Date();
 8         var mat1 = Math.PI;
 9         var mat2 = Math.random();
10         alert(typeof arr1);//object
11         alert(typeof arr2);//object
12         alert(typeof dat);//object
13         alert(typeof mat1);//number
14         alert(typeof mat2);//number
15 
16         alert(typeof [])//object
17         alert(typeof null);//object
18         //字符串有點特殊
19         var s1 = 'abc';
20         var s2 = new String('def');
21         alert(typeof s1);//string
22         alert(typeof s2);//object
23 
24         function fun() {
25 
26         }
27         alert(typeof fun);//function  
28         //3,一般null==undefined返回true ,null===undefined 返回false
29         if (null == undefined) { alert(true) }//true
30         if (null === undefined) { alert(true) } else {
31             alert(false);
32         }
33         //4,Boolean 轉換成false的的類型 “” 0和NaN null undefined 
typeof
 1   //instance
 2         var a = "abc.";
 3         var b = 1;
 4         var c = [1, 2, 3];
 5         var d = new Date();
 6         var e = function () { alert(1); };
 7         var f = function () { this.name = "2"; };        
 8         alert(c instanceof Array) //true
 9         alert(d instanceof Date) 
10         alert(f instanceof Function)//true
11         // alert(f instanceof function)// false
12         //instanceof 后面一定要是對象類型,注意大小寫不能錯
instanceof
1  function A() { }
2         alert(typeof A);//function
3         var a = new A();
4         alert(typeof a);//object
5 
6         //構造函數 
7         //new 1創建實例 2將函數的原型賦值給這個實例 3執行這個函數 并且這個函數的上下文this就是這個實例
8         alert(a.constructor)// function A() { }
9         alert(a.constructor === A)//true  ***************注意實例能直接調用對應原型中屬性方法。比如a直接調用原型中的constructor
constructor
1 function A() { }
2         var a = new A();
3         alert({}.toString.call(a))//[object Object]
4         alert({}.toString.call(A))//[object Function]
5         alert(Object.prototype.toString.call([]))//[object Array]
6         alert({}.toString.call([]))//[object Array]
7         alert({}.toString.call(new Date()))//[Object Date]
{}.toString.call()或者(Object.prototype.toString.call())

/1typeof:判斷除了Null的5個基本類型準確,但是想Date Array Regexp不準 2先知道類型,再判斷是否是這個類型
//instaneceof,準確,但必須先知道類型,然后判斷是否為這個類型
//constructor(得到構造函數
//跨iframe時候 instanceof 和constructor有問題,具體什么問題不清楚
//用jquery.type(),把null undefined 復雜類型和 除null和undefined外的4中基本類型都包含了。 核心代碼{}.toString.call(obj) //[object ...]

二,創建對象全解

jQuery創建$(),這$()是個方法,里面renturn一個對象,new的時候,覆蓋構造函數的對象。運用構造函數+寄生創建對象,核心理解原型鏈。

 1 var jQuery = function( selector, context ) {
 2         // The jQuery object is actually just the init constructor 'enhanced'
 3         return new jQuery.fn.init( selector, context );
 4     }
 5 
 6 jQuery.fn = jQuery.prototype = {
 7     init: function( selector, context ) {
 8         var match, elem, ret, doc;
 9 
10         // Handle $(""), $(null), or $(undefined)
11         if ( !selector ) {
12             return this;
13         }
14 .......
15 
16 jQuery.fn.init.prototype = jQuery.fn;
$()對象創建

return new jQuery.fn.init( selector, context );為什么不直接返回new jQuery();應為new的時候,會調用jQuery....然后又new..死循環。
將jquery下的prototype下的init方法的原型=jquery下的prototype。意思:newjQuery.fn.init()對象具有 init方法的原型中的所有方法 的實例,就會具有jquery下的prototype下的所有方法,擴展jquery下的prototype下的方法。就等于擴展$()的方法。

創建對象的形式:說的3種,5種什么的,沒什么意思的。其實看書之后總結是7種,不過沒什么意思。核心還是構造函數+原型,知道之后其余的稍微看一下就會的。

原始:var obj={};或者var obj=new Object() ;obj.attr1=..,obj.attr2=..

工廠:function factory(par1,par2,...){var obj=new Object();obj.attr=par1..;return obj}

構造函數:function A(){} var a=new A();

構造函數+原型:function A(){} var a=new A(); A.prototype={attr1:..;fun1:...}

動態構造函數:function A(){this.attr1=..;this.attr2=..;if(typeof this.fun1!='function'){A.prototype.fun1=function(){....}}} ? ?var a=new A(); a.fun1();//函數內部沒有的,我再在原型中創建。這個整體寫法,將原型寫到方法體內了。就相當我們c#的語言一樣了,將類的所有的方法寫到一個類中。

寄生構造函數:function A(){vat a=new ..;this.attr1=... ? return a;}//return的結果,覆蓋構造函數new時候默認返回的實例。

穩妥構造函數:看高級編程之后,實在發現不出和工廠方法有什么區別。這都什么飛機?我簡單認為就是工廠模式。核心為了“安全”,不使用this,不使用new。

三,引用問題

//在h5游戲開發中,經常會有這樣的要求:復制出一個對象,但修改原來的對象,不會造成對復制出的對象造成影響。我們需要理解一些基本的東西。

 1         //1在閉包內,盡量不適用同一個變量名,比如下面的a。因為作用域就近找變量。不會按照人眼看到的從上到下執行。
 2         //2變量和函數的聲明,放到最上面。因為js程序運行的時候自動會將聲明提升到當前作用域的最頂端
 3         var a = "global";
 4         function b() {
 5             console.log(a);//undefined  1先在當前上下文作用域內找a,就近原則!。當前作用于內不存在,就從上級作用域找...上級
 6             var a = "local";//此時var a聲明會提升到當前上下文(作用域最頂端)
 7             console.log(a);//local
 8         }
 9         b();
10 
11         var m = "global";
12         function n() {
13             var m;
14             console.log(m);//undefined
15             m = "local";
16             console.log(m);//local
17         }
18         n();
19         var k = "global";
20         function l() {
21             var k;
22             console.log(k);//undefined  找到當前作用域的k,就不會再往作用域鏈上繼續找
23             console.log(k);//undefined
24         }
25         l();
26         var s = "global";
27         function t() {
28             console.log(s);//undefined  找到當前作用域的k,就不會再往作用域鏈上繼續找
29             console.log(s);//undefined
30         }
31         t();
變量,函數聲明的習慣。常出現的錯誤

四,擴展實質全解

jQuery.extend = jQuery.fn.extend = function() {// copy reference to target objectvar target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options, name, src, copy;// Handle a deep copy situationif ( typeof target === "boolean" ) {deep = target;target = arguments[1] || {};// skip the boolean and the targeti = 2;}// Handle case when target is a string or something (possible in deep copy)if ( typeof target !== "object" && !jQuery.isFunction(target) ) {target = {};}// extend jQuery itself if only one argument is passedif ( length === i ) {target = this;--i;}for ( ; i < length; i++ ) {// Only deal with non-null/undefined valuesif ( (options = arguments[ i ]) != null ) {// Extend the base objectfor ( name in options ) {src = target[ name ];copy = options[ name ];// Prevent never-ending loopif ( target === copy ) {continue;}// Recurse if we're merging object literal values or arraysif ( deep && copy && ( jQuery.isPlainObject(copy) || jQuery.isArray(copy) ) ) {var clone = src && ( jQuery.isPlainObject(src) || jQuery.isArray(src) ) ? src: jQuery.isArray(copy) ? [] : {};// Never move original objects, clone themtarget[ name ] = jQuery.extend( deep, clone, copy );// Don't bring in undefined values} else if ( copy !== undefined ) {target[ name ] = copy;}}}}// Return the modified objectreturn target;
};
jQuery的擴展(extend)

注意:$.extend和$().extend,都是用這一個方法搞定的。

1  //extend
2         var obj1 = $.extend({}, { name: 'lk', age: 18 }, { weight: 120 })
3         var obj2 = $.extend({}, { name: 'lk', attr: { age: 15, hair: 'red' } }, { weight: 120 })
4         var obj3 = $.extend(false, { name: 'lk', attr: { age: 15, hair: 'red' } }, { weight: 120 }, { attr: { sight: 5.0 } })
5         console.log(obj3);//{name: "lk",weight: 120,attr:{sight: 5.0}}
6         var obj4 = $.extend(true, { name: 'lk', attr: { age: 15, hair: 'red' } }, { weight: 120 }, { attr: { age: 18, sight: 5.0 } })
7         console.log(obj4);//{name: "lk",weight: 120,attr:{age: 18, hair: 'red',sight: 5.0}}
extend使用

注意遞歸的使用:

  function multi(num) {//終止條件if (num == 1) {return 1;}return num * multi(num - 1);//5*4*3*2*1
}console.log(multi(5))//120
遞歸,先遞后歸

//我們想把這個對象真正的復制一份出來
var obj1 = { a: 15 }
var obj2 = obj1;
obj1.a = 18;
console.log(obj2); //{a:18 }//想要的是講obj1對象“拷貝”給obj2之后,改obj1,不會造成對obj2的影響。

拷貝就是采用的遞歸:

 1  function copy(obj) {
 2             var newObj = {}
 3 
 4             for (var key in obj) {
 5                 newObj[key] = obj[key]
 6             }
 7             return newObj;
 8 
 9         }
10         var obj4 = copy(obj3);
11         obj3.a = 18;
12         console.log(obj3)//{a:18}
13         console.log(obj4)//{a:20} 通過這種拷貝的形式,就會使得不會相互影響,脫離的“引用問題”干擾。
模擬一個淺拷貝
function deepCopy(obj) {//終止條件,當不是{key:value}對象時if (typeof obj != 'object') {return obj;}var newObj = {}for (var key in obj) {newObj[key] = deepCopy(obj[key]);//“遞”次調用,最后”歸“一
}return newObj;}var obj8 = deepCopy(obj7);obj7.a.b.c = 18;console.log(obj7);//{ a: { b: { c: 18 } } }console.log(obj8); //{ a: { b: { c: 15 } } }
模擬一個深拷貝

自己模仿一個擴展。

 1   function Bird() {
 2             this.wing = 2;
 3             this.fly = function () {
 4                 alert("fly");
 5             }
 6         }
 7  Bird.kuozhan = Bird.prototype.kuozhan = function (obj) {
 8             for (var key in obj) {//{a:5,b:10}
 9                 this[key] = obj[key]
10             }
11             return this;
12         }
Bird.kuozhan=Bird.prototype.kuozhan =function(){}
 1   //函數:既是方法,又是變量,還是對象。那么函數肯定有屬性、方法
 2         //擴展靜態方法
 3         //var Bird= function () {
 4 
 5         function Bird() {
 6             this.wing = 2;
 7             this.fly = function () {
 8                 alert("fly");
 9             }
10         }
11         Bird.say = function () {
12             alert('say');
13         }
14         Bird.run = function () {
15             alert('run');
16         }
17         // Bird.fly();//這里出現錯誤,只能其實例調用
18         var bird = new Bird();
19         bird.fly();
20 
21         Bird.say();//say
22         Bird.run();//run
23         //對一個方法對象擴展同時擴展多個方法(自己調用),更為方便的寫法
24         //看一些框架中,把擴展的多個方法弄成一個對象,整體做參數,傳進去,就把這個參數對象的方法一個一個擴展到原來對象上去了。就類似
25         //{fun1:function(){},fun2:function(){},fun3:function(){}},然后一自動對齊,顯得逼格十足。
26         //要實現這點,下部如何將一個對象的方法一個一個擴展到原來對象上去呢?是的,我們就寫出這個擴展方法。少用“=”,多用“:”
27 
28         Bird.kuozhan = Bird.prototype.kuozhan = function (obj) {
29             for (var key in obj) {//{a:5,b:10}
30                 this[key] = obj[key]
31             }
32             return this;
33         }
34         Bird.kuozhan({
35             s: function () {
36                 alert('1');
37             },
38             r: function () {
39                 alert('2');
40             }
41         })
42         Bird.s();
43         Bird.r();
44         Bird.prototype.kuozhan({
45             m: function () {
46                 alert('m');
47             },
48             n: function () {
49                 alert('n');
50             }
51         })
52         var b = new Bird();
擴展使用

五,繼承注意

?

 1 /*引用的問題*/
 2         /*********************************************************************/
 3         /*數組*/
 4         var a=[1,2,3];
 5         var b=a;
 6         //a.push(4);//修改的問題
 7         b.push(4);//修改的問題
 8         console.log(a);//[1,2,3,4]
 9         console.log(b);//[1,2,3,4]
10 
11 
12         var a=[1,2,3];
13         var b=a;
14         //=等號 :重開辟新空間重新賦值 開辟新空間導致  就不會再存在引用類型修改的問題
15         a=[7,8,9]
16         console.log(a);//[7,8,9]
17         console.log(b);//[1,2,3,4]
18 
19         /*********************************************************************/
20          /*object*/
21          var obj1={name:"老李"};
22          var obj2=obj1;
23          obj2.name="老王"
24          console.log(obj1);//{name:"老王"}
25          console.log(obj2);//{name:"老王"}
26 
27          var obj1={name:"老李"};
28          var obj2=obj1;
29 
30          obj2={haha:"笑哈哈"}
31          console.log(obj1);{name:"老李"}
32          console.log(obj2);{haha:"笑哈哈"}
33 
34         /*********************************************************************/
35         /*特殊的方法,不能修改*/
36         var a=function(){alert('qqqqq')}
37         var b=a;
38         //函數只能=  函數不能修改,不存在修改的問題 
39         b=function(){alert('wwww')}
40         a();//qqqqq
41         b();//wwww
數組、Object、function,修改、重新賦值的問題

?

?

?

?

?

 function Person(name, age) {this.name = name;this.age = age;this.aler = function () {alert(1);}}Person.prototype = {//因為prototype是對象,可以寫成無序鍵值對sayHi: function () { alert('sayhi'); },sayHello: function () { alert('sayhello'); }}function student(sname, sage) {//
            Person.call(this, sname, sage);//we
        }//student.prototype = Person.prototype;student.prototype = new Person();student.prototype.constructor = student;var stu1 = new student();stu1.aler();stu1.sayHi();stu1.sayHello();
繼承勿忘修正構造函數指向

//student.prototype = Person.prototype;
student.prototype = new Person();//可以來個”父類“實例,因為原型鏈
student.prototype.constructor = student;//上面的代碼已經破壞了原型的構造指向,勿忘修改。

轉載于:https://www.cnblogs.com/leee/p/4791364.html

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/272980.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/272980.shtml
英文地址,請注明出處:http://en.pswp.cn/news/272980.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

python實現連續數列相加_技術 | Python經典面試題解析實現斐波那契數列

黑馬程序員微信號&#xff1a;heiniu526傳智播客旗下互聯網資訊&#xff0c;學習資源免費分享平臺大家在面試過程中經常會考到斐波那契數列&#xff0c;斐波那契數列(Fibonacci)最早由印度數學家Gopala提出&#xff0c;而第一個真正研究斐波那契數列的是意大利數學家 Leonardo …

廣西2021高考成績位次查詢,2020年廣西高考一分一段表及高考位次成績排名查詢(理科+文科)...

一、2020年廣西高考一分一段表查詢排名方法廣西招辦(考試院)會公布的省市高考每一分分數的考生數額統計表就是我們所說的——高考“一分一段表”&#xff0c;其顯示出每一分的分數值全省考生有多少名&#xff0c;就可以讓考生估算出自己的排名位次。2020年廣西高考一分一段表排…

PV公式

IP(獨立IP)&#xff1a; 即Internet Protocol,指獨立IP數。00:00-24:00內相同IP地址之被計算一次。PV(訪問量)&#xff1a; 即Page View, 即頁面瀏覽量或點擊量&#xff0c;用戶每次刷新即被計算一次。UV(獨立訪客)&#xff1a;即Unique Visitor,訪問您網站的一臺電腦客戶端為…

csv文件 內容轉義_CSV文件如何同時轉義逗號和雙引號?

小編典典有幾個庫。這是兩個示例&#xff1a;阿帕奇共享郎包括一類特殊的逃避或UNESCAPE字符串(CSV&#xff0c;EcmaScript的&#xff0c;HTML&#xff0c;Java和JSON&#xff0c;XML)org.apache.commons.lang3.StringEscapeUtils 。轉義 為CSVString escaped StringEscapeUti…

臺式計算機單核與雙核,什么是單核cpu、雙核cpu 單核cpu和雙核cpu的區別是什么...

在買電腦的時候&#xff0c;我們經常會發愁&#xff0c;究竟是買單核cpu好&#xff0c;還是買雙核cpu比較好&#xff0c;尤其是面對售貨員把單核cpu電腦和雙核cpu電腦都可以夸的天花亂墜的時候&#xff0c;我們更糊涂了&#xff0c;究竟買哪種好呢?針對這種情況&#xff0c;小…

當用DJANGO的migrate不成功時。。。。

URL:http://my.oschina.net/u/862582/blog/355421 因為操作SQL數據庫時不規范&#xff0c;或是多人開發時產生了同步問題&#xff0c;就可能導致正規的MIGRATE時不能完成。 已其修改&#xff0c;不如直接生成SQL之后運行。。 記住語法即可。。。 python manage.py sqlmigrate a…

R語言seqm_R語言seq()函數用法

1、seq()用來生成一組數字的函數。Usage&#xff1a;## Default S3 method:seq(from 1, to 1, by ((to - from)/(length.out - 1)),length.out NULL, along.with NULL, ...)seq.int(from, to, by, length.out, along.with, ...)seq_along(along.with)seq_len(length.out)A…

美國計算機生物學要求,美國大學CS專業分支生物信息學和計算生物學專業 Bioinformatics and Computational Biology介紹...

美國留學申請美國大學計算機專業(CS)的學生非常多。美國大學CS專業的研究分支也非常 多&#xff0c;不同分支對學生的要求也會不同&#xff0c;因此&#xff0c;學生們要根據自己的條件選擇適合自己的研究方向。下面主要為大家介紹的是美國大學CS專業分支生物信息學和計算生物學…

Spark入門實戰系列--8.Spark MLlib(上)--機器學習及SparkMLlib簡介

【注】該系列文章以及使用到安裝包/測試數據 可以在《傾情大奉送--Spark入門實戰系列》獲取 1、機器學習概念 1.1 機器學習的定義 在維基百科上對機器學習提出以下幾種定義&#xff1a; l“機器學習是一門人工智能的科學&#xff0c;該領域的主要研究對象是人工智能&#xff0c…

cadz軸歸零命令_CAD圖形Z軸坐標歸零方法

AutoCAD2012 64位精簡版中文免安裝版軟件大小&#xff1a;561.5M授權方式&#xff1a;免費軟件立即下載CAD軟件怎樣將圖形坐標Z軸歸零?當我們遇到CAD圖形標高一致的時候&#xff0c;如果想要讓圖形統一標高&#xff0c;就需要先將圖形坐標Z軸歸零。本次小編為您整理了CAD軟件里…

net以execl做數據庫_[原創]Net實現Excel導入導出到數據庫(附源碼)

關于數據庫導出到Excel和SQLServer數據導出到Excel的例子&#xff0c;在博客園有很多的例子&#xff0c;自己根據網上搜集資料&#xff0c;自己做了亦歌簡單的demo&#xff0c;現在分享出來供初學者學習交流使用。一、數據庫導入導出到Excel&#xff0c;比較流行的有兩種方式&a…

計算機基礎cpu知識,CPU基礎知識: DIY裝機小白必看的CPU知識掃盲

CPU也就是中央處理器&#xff0c;全拼為Central Processing Unit&#xff0c;在計算機中可以比喻成人的大腦。它是一塊超大規模的集成電路&#xff0c;是一臺計算機的運算核心和控制核心。它的功能主要是解釋計算機指令以及處理計算機軟件中的數據。下面華強電子網的小編分享一…

const 用法

static NSString * const testString "google"; //表示testString這個指針不能被修改&#xff0c;如若對testString賦值則會報錯&#xff1a;testString &#xff1d; "hello";編譯器會報錯 static NSString const *testString "google"; //表…

mvc html validator,ASP.NET MVC實現Validation驗證器擴展

今天介紹在ASP.NET MVC實現Validation驗證器擴展,通過使用Controller驗證并不是最好的方法&#xff1a;驗證過于分散&#xff0c;容易造成重復代碼&#xff0c;不利于維護與擴展,因此本節將使用MVC默認綁定器(DefaultModelBinder)中包含了驗證架構,并實現Validation驗證器擴展&…

git 幾種還原版本_Git恢復之前版本的兩種方法reset、revert(圖文詳解)

一、問題描述在利用github實現多人合作程序開發的過程中&#xff0c;我們有時會出現錯誤提交的情況&#xff0c;此時我們希望能撤銷提交操作&#xff0c;讓程序回到提交前的樣子&#xff0c;本文總結了兩種解決方法&#xff1a;回退(reset)、反做(revert)。二、背景知識git的版…

自定義列表視圖

通過繼承BaseAdapter寫一個子類&#xff0c;可以創建自定義列表視圖&#xff1a; public class MyListAdapter extends BaseAdapter { private LayoutInflater mInflater;//聲明一個LayoutInflater類變量 private Context mContext;//聲明一個Context類變量 priva…

計算機專業答辯模板,論文答辯模板-計算機專業.ppt

《論文答辯模板-計算機專業.ppt》由會員分享&#xff0c;可在線閱讀&#xff0c;更多相關《論文答辯模板-計算機專業.ppt(9頁珍藏版)》請在裝配圖網上搜索。1、基于S2SH論壇系統的設計與實現,專業&#xff1a; 姓名&#xff1a; 學號&#xff1a; 指導教師&#xff1a;,(附)論文…

springmvc請求返回一個字符_SpringMVC系列之Web利器SpringMVC

課程簡介&#xff1a;課程目標&#xff1a;了解SpringMVC和Spring的關系&#xff0c;能夠使用SpringMVC框架開發自己的Web應用。整合Spring , SpringMVC , MyBatis搭建項目開發環境&#xff0c;理解三層架構和MVC模式適用人群&#xff1a;適合對Java基礎知識應用自如&#xff0…

一次完整較為滲透過程

步驟一&#xff1a; 利用阿D瀏覽器通過https&#xff1a;//s.bt.gg 注入關鍵字掃描發現注入點&#xff1a; http://www.rqyl.gov.cn/*****.php?ID153 用啊D跑不出賬號密碼 步驟二&#xff1a; 手工注入http://www.rqyl.gov.cn/*****.php?ID153 and 11 、and12出錯 猜字段ht…

html5 filereader讀取文件,H5的FileReader分布讀取文件應該如何使用以及其方法簡介...

這次給大家帶來H5的FileReader分布讀取文件應該如何使用以及其方法簡介&#xff0c;H5的FileReader分布讀取文件的使用以及其方法簡介的注意事項有哪些&#xff0c;下面就是實戰案例&#xff0c;一起來看一下。先介紹一下H5中FileReader的一些方法以及事件FileReader方法名稱 作…