第二个问题:建议用
document.form1.MUSIC1.SRC="2.wma"
或者
将name改为id<EMBED
id="MUSIC1"
SRC="1.wma"
Loop=-1
AUTOSTART=false
Hidden=true
MASTERSOUND>
document.getElementById("MUSIC1").src="2.wma"
或者
var
MUSIC1=
document.createElement("embed")
MUSIC1.src="2.wma"
浏览器兼容性问题吧:
var swfplayerif(navigator.appName.indexOf("Microsoft") != -1){
swfplayer = document.getElementById(swfContainer)
}
else{
swfplayer = document[swfContainer]
}
swfplayer.stop()
<!DOCTYPE HTML><html>
<head>
<meta charset="UTF-8" />
<title>last.html</title>
<style>
</style>
<script type="text/javascript" src="jquery-1.8.0.min.js"></script>
<script type="text/javascript">
$ (function ()
{
var player = $ ("#player")[0]
$ ('#b5').click (function ()
{
player.Play ()
})
$ ('#b6').click (function ()
{
player.Pause ()
})
$ ('#b7').click (function ()
{
player.Stop ()
})
})
</script>
</head>
<body>
<EMBED id="player" src="Music/MusicList/xxdd.mp3" autoplay="false" hidden=no style="scrollbar-3dlight-color: #000">
</EMBED>
<input type="button" value="播放" id="b5" />
<input type="button" value="暂停" id="b6" />
<input type="button" value="停止" id="b7" />
</body>
</html>