第一种方式采用wmplayer控件 <object name=wmplayer classid=CLSID:DFBFDABCCE width= height= codebase= activex/controls/mplayer/en/nsmpinfcab# Version= height= id=MIDIPlayer type=application/xoleobject VIEWASTEXT standby= 加载 Microsoft Windows Media Player 组件> <param name=FileName value= > <param name=AutoStart value=true> <param name=AutoRewind value=> <param name=AnimationAtStart value=false> <param name=ShowControls value=false> <param name=ClickToPlay value=false> <param name=EnableContextMenu value=true> <param name=EnablePositionControls value=false> <param name=Balance value=> <param name=ShowStatusBar value=false> <param name=AutoSize value=> <embed type=application/xmplayer pluginspage=yer/ filename src autostart=false enablecontextmenu=false clicktopla y=false enablepositioncontrols=false showcontrols= showstatusbar= showdisplay=> </object> 第二种方式html标签似乎更简单 <bgsound id=bgsound src= loop= > <input type=button value=停止 onclick=_stop()> <input type=button value=开始 onclick=_start()> <script language=JavaScript> function _start() { bgsoundsrc = ; } function _stop(){ bgsoundsrc = ; } </scrip> |