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