У меня много td в html-документе, содержащем атрибут фона. Я хочу изменить путь фона td.Fowlowing - один из примеров td:
<td background="/v/vspfiles/templates/AlligatorPerform/images/Grid_Single_Divider_Vert.gif">
<img width="3" height="3" src="http://alligatorperformanceblog.com/vspfiles/templates/AlligatorPerform/images/clear1x1.gif">
</td>
в приведенном выше примере я хочу изменить
background="/v/vspfiles/templates/AlligatorPerform/images/Grid_Single_Divider_Vert.gif"
в
background="http://alligatorperformanceblog.com/vspfiles/templates/AlligatorPerform/images/Grid_Single_Divider_Vert.gif"
кто-нибудь может помочь мне, как это сделать.
Используйте селектор атрибутов jquery для выбора всего td с атрибутом фона
$("td[background]").each(function(){
$(this).attr("background","http://alligatorperformanceblog.com/vspfiles/templates/AlligatorPerform/images/Grid_Single_Divider_Vert.gif");
});