采用方式
<object id="soundControl" width="0" height="0" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715"
align="baseline" border="0" standby="Loading Microsoft Windows Media Player components..."
type="application/x-oleobject">
<param name="invokeURLs" value="0"/>
<param name="autostart" value="1"/>
</object>
HTML:
<input id="btPlay" tabindex="-1" type="button" value="Tone" class="btn_main_1" onclick="start_player('../wave/bwin_cn.mp3',0);" />
JS中
function start_player(url,index)
{
var player = document.getElementById("soundControl")
if( index==0)
{
var userName = document.getElementById("userName");
userName.focus();
player.URL = url;
player.controls.play(); }
else if(index==1)
{
player.URL = url;
player.controls.play();
}}
这样做在IE中是没有问题的,方法来自于网络,但是在FF中就不行了,网上说需要这个插件
mozactivex-ff-15.xpi,我把次插件下载下来了,拖到FF中安装,最后提示,找不到安装脚本的错误
请教一下大家这个是怎么回事,我的FF是3.5版本的
<object id="soundControl" width="0" height="0" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715"
align="baseline" border="0" standby="Loading Microsoft Windows Media Player components..."
type="application/x-oleobject">
<param name="invokeURLs" value="0"/>
<param name="autostart" value="1"/>
</object>
HTML:
<input id="btPlay" tabindex="-1" type="button" value="Tone" class="btn_main_1" onclick="start_player('../wave/bwin_cn.mp3',0);" />
JS中
function start_player(url,index)
{
var player = document.getElementById("soundControl")
if( index==0)
{
var userName = document.getElementById("userName");
userName.focus();
player.URL = url;
player.controls.play(); }
else if(index==1)
{
player.URL = url;
player.controls.play();
}}
这样做在IE中是没有问题的,方法来自于网络,但是在FF中就不行了,网上说需要这个插件
mozactivex-ff-15.xpi,我把次插件下载下来了,拖到FF中安装,最后提示,找不到安装脚本的错误
请教一下大家这个是怎么回事,我的FF是3.5版本的
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货