<td align="center" background="Images/respon_tframe_m.gif"><a href="#" class="style28" οnclick="">工作程序</a></td>
用javascript 能得到td 里面的背景颜色吗??
<td id="cell" align="center" background="Images/respon_tframe_m.gif"><a href="#" class="style28" οnclick="">工作程序</a></td>
<script language=javascript>
function getAttribute(ctrId, attributeName) {
var c = document.all(ctrId);
return c.getAttribute(attributeName);
}
alert( getAttribute("cell", "background") );
</script>
function setAttribute(ctrId, attributeName, attributeValue) {
var c = document.all(ctrId);
return c.setAttribute(attributeName, attributeValue, 0);
}
setAttribute("cell", "background", "Images/respon_tframe_m.gif");