JS--写一个音乐播放页面(播放次数)

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title> 
<script>
function c1(){
    music_player.num1.value++;
}
function c2(){
    music_player.num2.value++;
}
function c3(){
    music_player.num3.value++;
}
function c4(){
    music_player.num4.value++;
}

</script>
</head>
<body>
<form name="music_player">
<table    border="1" cellpadding="10"  bgcolor=pink>
<tr><td bgcolor="#CC6699" colspan=4>光良---->光芒</tr>
<tr><th>编号<th>歌曲名称<th>在线播放<th>点播计数</tr>
<tr><td>1<td>Justin Bieber - Love Yourself   <td><embed src="Justin Bieber - Love Yourself.mp3" onClick=c1()>
<td><input type="text" value="0" name="num1" size="1">
<tr><td>2<td>01 Lecon 1 Bonjour ! <td><embed src="01 Lecon 1 Bonjour !.mp3" onClick=c2()>     
<td><input type="text" value="0" name="num2" size="1">
<tr><td>3<td>02 Lecon 1 Vocabulaire et expressions   <td><embed src="02 Lecon 1 Vocabulaire et expressions.mp3" onClick=c3()> 
<td><input type="text" value="0" name="num3" size="1">
<tr><td>4<td>04 Lecon 1 Exercices<td><embed src="04 Lecon 1 Exercices.mp3" onClick=c4()> 
<td><input type="text" value="0" name="num4" size="1">

</table>
</form>
</body>
</html>

其中MP3只需要和html放在同一个路径下即可正常播放

计数时:按一次播放一次关闭 计一次数

这里写图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值