日期:2014-05-18 浏览次数:20609 次
<td id="imgmenu0" background="image/menuup.jpg" style="height:25px; cursor:hand;" onclick="showmenu(0)"> <span>系统维护</span>
</td>
//相应js代码:(以前的写法是对的)
……
imgmenu0.background="image/menudown.gif";
<td style="height:25px;background-image:url("image/menuup.gif")</td>
//我写的相应js代码不对啊
……
imgmenu0.background-image=url("image/menudown.gif");
<style type="text/css">
#td {
background: image/menuup.jpg;
height:25px;
cursor:hand
}
</style>
<td id="imgmenu0" class="tdclass" onclick="showmenu(0)">
------解决方案--------------------
<table>
<tr>
<td id="imgmenu0" style="background-image:url('img/logo.png');height:200px;width:400px">a</td>
</tr>
</table>
<script type="text/javascript">
imgmenu0.style.backgroundImage = 'url("img/login_bg.jpg")';
</script>