编程高手请进:我要让下面播放器延迟按我设定的时间播放的代码,谢谢!

来源:百度知道 编辑:UC知道 时间:2024/05/17 04:05:52
这是一段播放器代码: <EMBED src="http://source.xiaonei.com/tribe/20070318/1850/orig1833637.MP3" width=400xp height=45xp autostart=true loop=true >,能不能让它定时间播放,比方说让他延迟1分钟播放?

可以,将以下代码复制下来并保存为html文档,运行就可以了
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<script language="JavaScript">
setTimeout("play()",6000)//1000为1秒
function play()
{
document.getElementById("player").controls.play();
}
</script>
</head>

<body>
<object id="player" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" type="application/x-oleobject" width="300" height="60">
<PARAM name="URL" value="http://source.xiaonei.com/tribe/20070318/1850/orig1833637.MP3">
<param name="autoStart" value="false">
</object>