解決辦法是Jquery創(chuàng)建HTML 元素對象,然后append HTML 內(nèi)容,返回相應的Jquery新的對象,類似于拷貝完成。
創(chuàng)新互聯(lián)是一家專注于網(wǎng)站建設、網(wǎng)站設計與策劃設計,左云網(wǎng)站建設哪家好?創(chuàng)新互聯(lián)做網(wǎng)站,專注于網(wǎng)站建設10年,網(wǎng)設計領域的專業(yè)建站公司;建站業(yè)務涵蓋:左云等地區(qū)。左云做網(wǎng)站價格咨詢:18982081108
原來代碼
[javascript] view plaincopyprint?
//var templateInsTotal = $("#tr_sample_one_biz:first", tab).clone();
//templateTwo = $("#tr_sample_two_biz:first").clone();
現(xiàn)在代碼
[javascript] view plaincopyprint?
var templateInsTotal = createTrElement($("#tr_sample_one_biz:first", tab));
var templateTwo = createTrElement($("#tr_sample_two_biz:first", tab));
function createTrElement(cloneObj) {
try {
if (cloneObj != null) {
var newObj = $("tr/tr");
newObj.append($(cloneObj).html());
newObj.attr("id", $(cloneObj).attr("id"));
newObj.attr("style", $(cloneObj).attr("style"));
newObj.attr("alltrusttag", $(cloneObj).attr("alltrusttag"));
newObj.attr("alltrustid", $(cloneObj).attr("alltrustid"));
return newObj;
}
} catch (e) {
alert(e);
}
return null;
}
jQuery1.x版本的框架時兼容所有IE瀏覽器的,而2.x版本的jQuery框架并不支持低端IE瀏覽器。此處的低端IE瀏覽器指的是IE8版本以及8版本以下。所以,對于需要全兼容的項目,就不得不使用1.x版本啦。
資料來源:HTML5學堂(wx+號)
jQuery新版本已經(jīng)不再進行IE低版本(IE6、IE7、IE8)的兼容性處理。
如果項目需要兼容IE低版本,需要使用jQuery1.x版本,從2.x開始已經(jīng)不兼容IE6、7、8了。
以下為jQuery官網(wǎng)的通知:
jQuery 2.x has the same API as jQuery 1.x, but does not support Internet Explorer 6, 7, or 8. All the notes in the jQuery 1.9 Upgrade Guide apply here as well. Since IE 8 is still relatively common, we recommend using the 1.x version unless you are certain no IE 6/7/8 users are visiting the site. Please read the 2.0 release notes carefully.
翻譯如下:
jQuery 2.x和jQuery的API用法相同,但是不再支持IE6、7、8。
1.9版本中的所有升級向導信息同樣適用于2.x
由于IE8仍然用戶較多,因此建議使用1.x版本,除非確定沒有用IE6、7、8的用戶訪問網(wǎng)站。
請仔細閱讀2.0的發(fā)布信息。
jQuery 1.x 支持IE6-8,2.0及以上不再支持IE8。
jQuery 1.x最新的版本是1.12.
以下是jQuery官網(wǎng)上的說明:
If you need to support older browsers like Internet Explorer 6-8, Opera 12.1x or Safari 5.1+, use?jQuery 1.12.
當前文章:jqueryie兼容,jquery兼容性
本文鏈接:http://jinyejixie.com/article30/dsdgopo.html
成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供App設計、定制網(wǎng)站、ChatGPT、網(wǎng)站收錄、云服務器、動態(tài)網(wǎng)站
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉載內(nèi)容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉載,或轉載時需注明來源: 創(chuàng)新互聯(lián)