js图片设置onmouseover和onmouseout后再设置onclick无效?
function mouseOver(){
document.getElementById('v1').src="images/2.jpg"
}
function mouseOut(){
document.getElementById('v1').src="images/1.jpg"
}
function show(){
document.getElementById('v1').src="images/2.jpg"
}
onclick事件show()无效 怎么让show有效果呢
------解决方案--------------------function mouseOver(){
document.getElementById('v1').src="images/2.jpg"
}
function mouseOut(){
if(document.getElementById('v1').className=="sel"){ return;}
document.getElementById('v1').src="images/1.jpg"
}
function show(){
document.getElementById('v1').className="sel";
document.getElementById('v1').src="images/2.jpg"
}