鼠标移到指定位置听音乐javascript,play sound on hover. stop and reset on hoveroff
来源:互联网 发布:淘宝国产高达禁卖 编辑:程序博客网 时间:2024/06/07 20:02
目标:
鼠标移动到指定位置,音乐从头播放;
鼠标移开,音乐停止播放;
<script>function PlaySound(soundobj) { var thissound=document.getElementById(soundobj); thissound.play();}function StopSound(soundobj) { var thissound=document.getElementById(soundobj); thissound.pause(); thissound.currentTime = 0;}</script><p onmouseover="PlaySound('mySound')" onmouseout="StopSound('mySound')">Hover Over Me To Play</p><audio id='mySound' src='http://upload.wikimedia.org/wikipedia/commons/6/6f/Cello_Live_Performance_John_Michel_Tchaikovsky_Violin_Concerto_3rd_MVT_applaused_cut.ogg'/>
stackoverflow原贴链接点这里
0 0
- 鼠标移到指定位置听音乐javascript,play sound on hover. stop and reset on hoveroff
- A class to play sound on netcf in CSharp
- A class to play sound on netcf in CSharp (二)
- Queue on Bus Stop
- Sound on iOS: Best Practices
- openAL sound on the iPhone
- 屏幕显示项目之-----画好界面无闪烁,鼠标移到指定位置改变图标
- Installing Google Play Service and Google Apps on Nexus AOSP
- L - Play on Words
- HDOJ Play on Words
- poj1386(Play on Words)
- Play on Words
- poj1386 Play on Words
- 10129 - Play on Words
- 1116 Play on Words
- comment on google play
- UVaOJ10129---Play on Words
- hdoj1116 Play on Words
- scikit-learn 进行tf-idf计算
- SSH进阶开端
- Unity实战 RTS3D即时战略游戏开发(五) 鼠标管理器
- Java复习总结——框架篇(二)
- C语言函数之一
- 鼠标移到指定位置听音乐javascript,play sound on hover. stop and reset on hoveroff
- AMD与CMD标准的区别
- 1390.Binary Numbers
- [RK3288][Android6.0] 调试笔记 --- 同时支持两颗USB UVC Camera
- 关于Nginx负载均衡的详解教程
- mysql导入数据load data infile用法
- Career and feeling的走向分析
- 并发概念
- Android学习之如何集成极光短信验证