2012-02-28 22 views

回答

8

IE不喜歡class作爲被保留,var class = 123同樣不能獲賠,而不是:

'class': 'toolmeup', 
0

看來,一個支架到底失蹤。

3

classreserved keyword -- for possible future use!你應該將其括在雙(或單)引號:

.append($('<td>').append($('<a>').attr({ 
    href: '#', 
    "class": 'assDelete', 
    dataassetid: assetObj.ID 
}).append($('<img>').attr({ 
    "class": 'toolmeup', 
    title: 'Delete Asset', 
    src: '../_resources/images/icons/delete.png' 
}))));​ 
0

包裝類報價

 
.append(
    $('').append(
     $('').attr({ 
     href: '#', 
     'class': 'assDelete', 
       dataassetid: assetObj.ID 
    }).append(
     $('').attr({ 
     'class': 'toolmeup', 
       title: 'Delete Asset', 
     src: '../_resources/images/icons/delete.png' 
    }) 
))` 
0

IE8有類作爲屬性名稱的問題。請嘗試以下操作:

.append( 
    $('<td>').append( 
     $('<a>').attr({ 
     href: '#', 
     'class': 'assDelete', 
       dataassetid: assetObj.ID 
    }).append( 
     $('<img>').attr({ 
     'class': 'toolmeup', 
       title: 'Delete Asset', 
     src: '../_resources/images/icons/delete.png' 
    }) 
))