“鼠标点击前和点机后的按钮上的图片不一样” 怎么实现!!!
如题!!
谢谢那位可以告诉我!
------解决方案-------------------- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN " "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<html xmlns= "http://www.w3.org/1999/xhtml ">
<head>
<meta http-equiv= "Content-Type " content= "text/html; charset=shift_jis " />
<title> </title>
</head>
<script>
function doFunction(){
if(document.getElementById( "test ").src == "http://www.csdn.net/Images/BiaoShi.gif "){
document.getElementById( "test ").src = "http://www.csdn.net/Images/logo_csdn.gif ";
} else{
document.getElementById( "test ").src = "http://www.csdn.net/Images/BiaoShi.gif ";
}
}
</script>
<body>
<img name= "test " id= "test " src= "http://www.csdn.net/Images/BiaoShi.gif " width= "32 " height= "32 " alt= " " onclick= "doFunction(); "/>
</body>
</html>