用javascript修改按钮style的背景图象?这么不工作?谢谢
<html >
<head runat= "server ">
<link href= "skin/styles_uc.css " rel= "stylesheet " type= "text/css " />
</head>
<body>
<form id= "form1 " runat= "server ">
<asp:Button ID= "btnGoHome1 " class= "button3 " Text= "Go Home " ValidationGroup= "Go " onmouseover= "changebg(); " runat=server BorderStyle= "Solid " BorderColor= "Gray " BorderWidth= "0.5 " />
<script language=javascript type= "text/javascript ">
function changebg()
{
var o = document.getElementById( "btnGoHome1 ");
newImage = "url(../images/button_bg4_2.png) ";
o.style.backgroundImage = newImage;
}
</script>
</form>
</body>
</html>
当鼠标移上时,背景变白,而没有变成我设置的背景.
谢谢
------解决方案--------------------呵呵,我第一个想到的就是路径问题,但我本想应该不会是如此低级的错误