0
我試圖爲id和onclick添加一個attr,它在firefox和chrome上工作,但由於某些原因,它不適用於IE 9。 任何替代或東西是錯誤的我的代碼?Jquery attr不適用於IE 9?
$(".extendedGridView tr td a").each(function (index)
{
if ($(this).html() == "Update")
{
$(this).attr('id', 'insertButton');
$(this).attr('onclick', "return Validate('extendedGridView')");
}
});
你可以嘗試改變'的.html()''來的.text()' – freebird
其進入,如果因爲我嘗試過的警惕和它的工作 – rtp
爲什麼你將相同的id分配給該td中的所有鏈接,freebird是正確的。 – Jai