diff --git a/avalon.js b/avalon.js index a71360294..85a1a07ea 100644 --- a/avalon.js +++ b/avalon.js @@ -1694,7 +1694,7 @@ for (i = wrap[0]; i--; wrapper = wrapper.lastChild) { } if (!W3C) { //fix IE - for (els = wrapper["getElementsByTagName"]("br"), i = 0; el = els[i++]; ) { + for (els = avalon.slice(wrapper["getElementsByTagName"]("br")), i = 0; el = els[i++]; ) { if (el.className && el.className === "msNoScope") { el.parentNode.removeChild(el) } @@ -1704,6 +1704,14 @@ fixVML(el) } } + if (tag === "tr") { + for (els = avalon.slice(wrapper.children), i = 0; el = els[i++]; ) { + // IE6-8,如果动态生成tr元素,必须会在后面添加早已废弃caption的标签,其nodeName,innerHTML都为"" + if (el.nodeName == "") { + el.parentNode.removeChild(el) + } + } + } } while (firstChild = wrapper.firstChild) { // 将wrapper上的节点转移到文档碎片上! fragment.appendChild(firstChild) diff --git a/avalon.min.js b/avalon.min.js index e03bf4959..133256655 100644 --- a/avalon.min.js +++ b/avalon.min.js @@ -60,17 +60,18 @@ b]=function(b){return x[c+":get"](this[0],void 0,!0===b?2:0)}});avalon.fn.offset return{top:c.top+h-b,left:c.left+e-g}};var Pc=/^]+))?)*\s+value[\s=]/i,Ka={"option:get":r.VBArray?function(b){return Pc.test(b.outerHTML)?b.value:b.text.trim()}:function(b){return b.value},"select:get":function(b,c){for(var d,e=b.options,f=b.selectedIndex,g=Ka["option:get"],h="select-one"===b.type||0>f,k=h?null:[],l=h?f+1:e.length,m=0>f?l:h?f:0;m"],param:[1,""],col:[2,"","
"],legend:[1,"
"],option:[1,"