2013-05-11 110 views
0

我想要聲音停止播放時,您不活動懸停圖片。什麼是最簡單的方法來做到這一點?提前致謝!停止播放聲音時,不懸停圖片

imgarr[i].onmouseout=function(){ 
    this.setAttribute('src',this.getAttribute('xsrc')) 
      } 
     })() 
    } 

更清楚地顯示在我的jsfiddle例如,
http://jsfiddle.net/3tnGL/

希望你能理解。

塞巴斯蒂安

+1

應該是圖像的URL中的一個類? – RST 2013-05-11 13:08:13

+0

是的。但是,它也指的是js文件中的一個類。 – Sebastian 2013-05-11 13:11:41

+0

在你的'onmouseout'函數中,你只能改變'src'的值。不應該有'stop/pause'命令嗎? – RST 2013-05-11 13:32:07

回答

0

這似乎很好地工作

imgarr[i].onmouseout=function(){ 
    this.setAttribute('src',this.getAttribute('xsrc')) 
    html5audio.pause() 
} 

我使用的是Firefox

+0

愛你。非常棒!非常感謝 – Sebastian 2013-05-11 15:41:24