在sharepoint中工作,目前在使用jquery管理動態表時遇到了麻煩。追加不接受Jquery中的屬性
我用append(),但是當我把一些屬性與元素一起它不會接受我的代碼。
那就是:
$('#matters_table tr:last-child').append('<tr><td class="classhere"><input type="text"></input></td></tr>');
大多數人都知道,這將細火:
$('#matters_table tr:last-child').append('<tr><td><input ></input></td></tr>');
但在我的情況下,我想屬性添加到它,甚至添加一些styles="width:95%"
內標籤。請幫助。我是jquery的新手。我對它並不熟悉。
你應該使用後...不是追加 –
http://jsfiddle.net/arunpjohny/p67ssg8d/1/ - 看起來很好 –
使用後' - http://jsfiddle.net/arunpjohny/p67ssg8d/2/ 。 –