是我理解錯(cuò)了嗎? 有些地方 多余啊!
提示一下:對(duì)象的第一個(gè)數(shù)字代表權(quán)值
提示一下:對(duì)象的第一個(gè)數(shù)字代表權(quán)值
2016-09-25
請(qǐng)大家學(xué)習(xí)的注意這兩個(gè)地方、很容易忽略:
1.上面的方法改掉了TYPE其實(shí)就是讓腳本無法解析(不是報(bào)錯(cuò))、js會(huì)忽略
2.上面關(guān)注的正則,是為了兼容XML進(jìn)行的處理、而上文是在javascript中運(yùn)行所以替換掉了
OK!
1.上面的方法改掉了TYPE其實(shí)就是讓腳本無法解析(不是報(bào)錯(cuò))、js會(huì)忽略
2.上面關(guān)注的正則,是為了兼容XML進(jìn)行的處理、而上文是在javascript中運(yùn)行所以替換掉了
OK!
2016-09-25
為大家解釋幾點(diǎn):
parentEles[0].ownerDocument //就是Document文檔對(duì)象
fragment.firstChild //獲取創(chuàng)建成功的DOM、也就是我們需要添加的對(duì)象
context.createElement("div") //不要誤解,就是普通的創(chuàng)建一個(gè)元素 一般:document.xxx 或者 $(...)
fragment.appendChild() //返回創(chuàng)建的元素,也就是DIV
if (first){callback.call(parentEles, first);} //如果創(chuàng)建成功,寫入文檔
自此:本頁內(nèi)容就是這些!
parentEles[0].ownerDocument //就是Document文檔對(duì)象
fragment.firstChild //獲取創(chuàng)建成功的DOM、也就是我們需要添加的對(duì)象
context.createElement("div") //不要誤解,就是普通的創(chuàng)建一個(gè)元素 一般:document.xxx 或者 $(...)
fragment.appendChild() //返回創(chuàng)建的元素,也就是DIV
if (first){callback.call(parentEles, first);} //如果創(chuàng)建成功,寫入文檔
自此:本頁內(nèi)容就是這些!
2016-09-21
規(guī)避WebKit checked屬性
// We can't cloneNode fragments that contain checked, in WebKit
if ( !jQuery.support.checkClone && arguments.length === 3 && typeof value === "string" && rchecked.test( value ) {return this.each(function() {jQuery(this).domManip( args, table, callback, true );});}
// We can't cloneNode fragments that contain checked, in WebKit
if ( !jQuery.support.checkClone && arguments.length === 3 && typeof value === "string" && rchecked.test( value ) {return this.each(function() {jQuery(this).domManip( args, table, callback, true );});}
2016-09-20
局部變量初始化
2: var results, first, fragment, parent,
3: value = args[0],
4: scripts = [];
5:
2: var results, first, fragment, parent,
3: value = args[0],
4: scripts = [];
5:
2016-09-20
1. 將args轉(zhuǎn)換為DOM元素,并放在一個(gè)文檔碎片中,調(diào)用jQuery.buildFragment和jQuery.clean實(shí)現(xiàn)
2. 執(zhí)行callback,將DOM元素作為參數(shù)傳入,由callback執(zhí)行實(shí)際的插入操作
2. 執(zhí)行callback,將DOM元素作為參數(shù)傳入,由callback執(zhí)行實(shí)際的插入操作
2016-09-20