四、在bofang1.asp页面你喜爱的地方在DWCS3的菜单栏上找到“插入记录”“媒体”“activex(x)”,完成了对媒体对象:activex(x)的插入。用鼠标选择activex(x),然后转到代码页中将以下代码复制上,保存好。这样所有的工作已经完成。
<script type="text/javascript">
AC_AX_RunContent( 'id','mplayer','width','500','height','300','classid','CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95','align','baseline','border','0','standby','Loading Microsoft Windows Media Player components...','type','application/x-oleobject','filename','<%=(rs.Fields.Item("music_url").Value)%>','showcontrols','1','showpositioncontrols','1','showaudiocontrols','1','showtracker','1','showdisplay','0','showstatusbar','1','autosize','0','showgotobar','0','showcaptioning','0','autostart','1','playcount','0','animationatstart','0','transparentatstart','0','allowscan','0','enablecontextmenu','1','clicktoplay','0','invokeurls','1','defaultframe','datawindow' ); //end AC code
</script><noscript><object id="mplayer" width="500" height="300" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
align="baseline" border="0" standby="Loading Microsoft Windows Media Player components..."
type="application/x-oleobject">
<param name="FileName" value="<%=(rs.Fields.Item("music_url").Value)%>">
<param name="ShowControls" value="1">
<param name="ShowPositionControls" value="1">
<param name="ShowAudioControls" value="1">
<param name="ShowTracker" value="1">
<param name="ShowDisplay" value="0">
<param name="ShowStatusBar" value="1">
<param name="AutoSize" value="0">
<param name="ShowGotoBar" value="0">
<param name="ShowCaptioning" value="0">
<param name="AutoStart" value="1">
<param name="PlayCount" value="0">
<param name="AnimationAtStart" value="0">
<param name="TransparentAtStart" value="0">
<param name="AllowScan" value="0">
<param name="EnableContextMenu" value="1">
<param name="ClickToPlay" value="0">
<param name="InvokeURLs" value="1">
<param name="DefaultFrame" value="datawindow">
</object></noscript>
三、在</body>上一行添加代码将数据库连接和数据表关闭以释放资源
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
四、运行liebiao2.asp,找到我们喜欢的歌后点击播放图标,接下来的工作就是听歌了,我真的“在心里从此永远有个你”