var wrap =
// option or optgroup
!tags.indexOf("<opt") &&
[ 1, "<select multiple='multiple'>", "</select>" ] || !tags.indexOf("<leg") &&
[ 1, "<fieldset>", "</fieldset>" ] || tags.match(/^<(thead|tbody|tfoot|colg|cap)/) &&
[ 1, "<table>", "</table>" ] || !tags.indexOf("<tr") &&
[ 2, "<table><tbody>", "</tbody></table>" ] || // <thead> matched above
(!tags.indexOf("<td") || !tags.indexOf("<th")) &&
[ 3, "<table><tbody><tr>", "</tr></tbody></table>" ] || !tags.indexOf("<col") &&
[ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ] || // IE can't serialize <link> and <script> tags normally
jQuery.browser.msie &&
[ 1, "div<div>", "</div>" ] ||
最后的这段/ IE can't serialize <link> and <script> tags normally
jQuery.browser.msie &&
[ 1, "div<div>", "</div>" ]什么意思?按我的理解就是如果是ie浏览器,div.innerHTML时候最后都会在原代码基础上添加div<div> </div>
// option or optgroup
!tags.indexOf("<opt") &&
[ 1, "<select multiple='multiple'>", "</select>" ] || !tags.indexOf("<leg") &&
[ 1, "<fieldset>", "</fieldset>" ] || tags.match(/^<(thead|tbody|tfoot|colg|cap)/) &&
[ 1, "<table>", "</table>" ] || !tags.indexOf("<tr") &&
[ 2, "<table><tbody>", "</tbody></table>" ] || // <thead> matched above
(!tags.indexOf("<td") || !tags.indexOf("<th")) &&
[ 3, "<table><tbody><tr>", "</tr></tbody></table>" ] || !tags.indexOf("<col") &&
[ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ] || // IE can't serialize <link> and <script> tags normally
jQuery.browser.msie &&
[ 1, "div<div>", "</div>" ] ||
最后的这段/ IE can't serialize <link> and <script> tags normally
jQuery.browser.msie &&
[ 1, "div<div>", "</div>" ]什么意思?按我的理解就是如果是ie浏览器,div.innerHTML时候最后都会在原代码基础上添加div<div> </div>
解决方案 »
- phantomjs如何使用~~
- 如何利用javascript导出pdf格式文件
- 求这段代码的意思啦
- 请问一下如果实现在同一个页面把需要的数据传送到一个空间里的接收程序上,页不影响到当前页面的正常执行!
- 我在网页里用xml.http下载文件失败该怎么办?
- 如何用javascript实现跨域数据传递?
- <table><tr>ssssssss<td></td><td>ssssss</td></tr></table>ssss太長了﹐想讓table現實出來好看點﹐怎麼辦﹖
- 请问:如何给一个字符串的某一位赋值?
- 一个例子,是关于用PHP增加select内容,但有D问题,请高手指教。
- 请教一个画板的问题
- 高手进来,该出手了,js的src问题
- jquery data对象
clean: function(elems,context)方法中elems在jquery.init对象中是html字符串然后又将emlems传递给jquery.each(elems,function(i,elem))each不是要求第一个参数为对象么,怎么是字符串如果是字符串那么for in解析的时候又是怎么回事?
本身是数组