發新話題

《JavaSCript 範例》音樂選擇播放

《JavaSCript 範例》音樂選擇播放

加入網頁步驟   
1.將以下的控制碼先複製起來。(用滑鼠將底下的一堆碼,標記起來,按滑鼠右鍵選擇【複製】就行啦!)
2.先將<BODY>先拿掉
3.然後在網頁中的 </HEAD> 之後將剛剛複製的東西貼上就大功告成了  !(按滑鼠右鍵選擇【貼上】就行啦!)
4.最後,更改原始碼中紅色字的部份的內容就可以了!(就是紅色字的地方,改成您想要的內容即可!)
引用:
<body topmargin="3" leftmargin="0" background="jpg/01_bkg1.jpg">
<script>
<!-- Activate Cloaking Device
var browser_check="";
if(navigator.appName=="Netscape" && parseInt(navigator.appVersion)>=3)
browser_check="n3_or_better";
if(navigator.appName.substring(0,9)=="Microsoft")
browser_check="msie";
function playSong(selection)
{
if (browser_check=="n3_or_better" || browser_check=="msie")
window.location.href=selection;
else
alert("\nSorry but this sound scheme is NOT supported by your browser.");
}
// Called by View Source button - displays text file of source.
function viewSource()
{
alert("\nA text file with source will be loaded to the full window.\n\nUse your browser BACK button to return to the examples.");
top.window.location.href="java";
}
// Called by About This button
function about()
{
alert("\nOf course, this example requires sound capabilities.\n\nOnly Netscape 3 or better and MSIE are allowed access to this sound scheme.");
}
// Deactivate Cloaking -->
</script>
<div align="center"><center>
<table border="0">
<tr>
<td><input type="button" value="音樂欣賞 (1)"
></td>
<td><input type="button" value="音樂欣賞 (2)"
></td>
<td><input type="button" value="音樂欣賞 (3)"
></td>
<td><input type="button" value="音樂欣賞 (4)"
></td>
<td><input type="button" value="音樂欣賞 (5)"
></td>
</tr>
</table>
</center></div>

TOP

發新話題

本站所有圖文均屬網友發表,僅代表作者的觀點與本站無關,如有侵權請通知版主會盡快刪除。