[转]在网页中加入声音文件,并且用JavaScript对其进行播放控制
来源:互联网 发布:安卓电视直播软件 编辑:程序博客网 时间:2024/06/06 07:33
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" validateRequest="false"%>
<!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 runat="server">
<title>无标题页</title>
<script language="javascript" type="text/javascript">
//用javascript进行声音播放控制
function ManageSoundControl(action)
...{
var soundControl = document.getElementById("soundControl");
if(action == "play")
...{
soundControl.play();
}
if(action == "stop")
...{
soundControl.stop();
}
}
</script>
</head>
<body>
<form id="form1" runat="server">
<table width="100%">
<tr>
<td>
<embed id="soundControl" src="求佛.mp3" mastersound hidden="true" loop="false" autostart="false"></embed>
<input id="btPlay" type="button" value="播放" onclick="ManageSoundControl('play')" />
<input id="btStop" type="button" value="播放" onclick="ManageSoundControl('stop')" />
</td>
</tr>
</table>
</form>
</body>
</html>
<!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 runat="server">
<title>无标题页</title>
<script language="javascript" type="text/javascript">
//用javascript进行声音播放控制
function ManageSoundControl(action)
...{
var soundControl = document.getElementById("soundControl");
if(action == "play")
...{
soundControl.play();
}
if(action == "stop")
...{
soundControl.stop();
}
}
</script>
</head>
<body>
<form id="form1" runat="server">
<table width="100%">
<tr>
<td>
<embed id="soundControl" src="求佛.mp3" mastersound hidden="true" loop="false" autostart="false"></embed>
<input id="btPlay" type="button" value="播放" onclick="ManageSoundControl('play')" />
<input id="btStop" type="button" value="播放" onclick="ManageSoundControl('stop')" />
</td>
</tr>
</table>
</form>
</body>
</html>
- [转]在网页中加入声音文件,并且用JavaScript对其进行播放控制
- 在网页中加入JavaScript
- 在网页上播放声音文件的方式
- 在网页中加入视频播放代码
- Web网页中使用Media Player播放MPG视频的代码,并且支持JavaScript控制播放,暂停等功能
- VC在应用程序中播放声音文件
- 在pb中实现声音文件的播放
- (转)在网页中控制wmplayer播放器
- 在网页中控制wmplayer播放器
- 在网页中控制wmplayer播放器
- 在网页中控制wmplayer播放器
- 在网页中控制wmplayer播放器
- 在网页中控制wmplayer播放器
- 在网页中控制wmplayer播放器
- 在网页中控制wmplayer播放器
- 在网页中控制WMPLAYER播放器
- VB中播放声音文件
- C#中播放声音文件
- 整合ewebeditor以及qcnews的文章发布系统
- 两个frame同步滚动
- symentec anywhere 导致显示驱动失效
- .net中using的几种用途 (平时不容易注意到)
- 匈牙利命名规则
- [转]在网页中加入声音文件,并且用JavaScript对其进行播放控制
- 儿童节快乐
- 怎样利用Windows XP 实现网络统一关机
- 对.Net 垃圾回收的C#编程相关方面(Finalize 和Dispose(bool disposing)和 Dispose())的一些理解体会
- Hibernate
- Java的常用包之一
- Eclipse快捷键指南
- 遍历屏幕设置的选项
- 教你进入有密码 Windows XP 系统的方法