將多媒體嵌入網頁的方法
1網頁背景音樂語法~
<bgsound src="http://音樂檔存放網路空間網址/音樂檔檔名.副檔名" loop="撥放次數">
例如:
<bgsound src=" ttp://140.111.135.1/web/source_img/schoolsong.wav " loop="infinite"> </bgsound> 放不停
<bgsound src=" http://140.111.135.1/web/source_img/schoolsong.wav " loop="1"> </bgsound> 放一遍
<bgsound src="mp3/m01.mp3" loop="infinite"> </bgsound> 放不停<bgsound src="mp3/m01.mp3" loop="1"> </bgsound> 放一遍
網頁背景音樂語法張貼位置並沒有特殊限制,網頁的大部份位置皆可張貼,最好張貼於</head>之下,以方便管理。注意聲音檔不要太大。
2放音樂的語法~
◎例如:
<embed src="mp3/m01.mp3" autostart="false" loop="1" height="45" width="230"></embed>
例如:
<embed src="http://140.111.135.1/web/source_img/schoolsong.wav" autostart="false" loop="1" height="45" width="230"></embed>
◎ autostart="true" 表示自動播放 ,autostart="false" 表示不自動播放
◎ hidden="true" 隱藏播放器 , hidden ="false" 表示不隱藏播放器
◎ loop="0" 播放一次即停止 ,loop="1" 無限次重複播放
◎ volume="0-100" 調整音量大小
◎ width="230" 播放器寬度,可自行更改為適合寬度
◎ hight="45" 播放器高度,可自行更改為適合高度
3放影片的語法~
例如:
<embed src="wmv/beauty.wmv" autostart="false" height="300" width="450"></embed>
例如:
<embed src=" http://140.111.135.1/web/public_web/wmv/law/95down/2.wmv " autostart="false" loop="1" WIDTH=450 HEIGHT=300></embed>
此基本語法可以支援的檔案類型為—
.mp3 (音效檔)
.wav (音效檔)
.au (音效檔)
.aif (音效檔)
.mid (Midi 音效檔)
.ra (real player’s file)
.ram (real player’s file)
.rm (real player’s file)
.mpg (media player’s file)
.swf (flash’s file)
.avi (media player’s file)
.mov (Quick Time’s file)
絕對路徑與相對路徑
類別 | 範例 | 說明 |
絕對路徑 | file:///c:/windows/odbc.ini | 本機D槽上的一個 HTML 檔案 |
http://www.cs.nthu.edu.tw | 網路上一台 WWW Server 上的一個 HTML 檔案 | |
/jang/courses/cs3431 | 本機 WWW 根目錄下的一個目錄 | |
相對路徑 | text.html | 表同一層目錄下的 text.html 檔案 |
./text.html | 表同一層目錄下的 text.html 檔案 | |
image/text.html | 表示 image 子目錄下的 text1.gif 檔案 | |
../index.html | 表示上一層目錄下的 index.html 檔案 | |
../html40/cover.html | 表示上一層目錄下 html40 子目錄的 index.html 檔案 |