㊣傲楓曰:讓你的網頁動起來。

動態的換頁

 大家一定看過一個效果,就是進入一個頁面之後,過了幾秒鐘,他
 會自動的換到下一頁去,看起來很炫,其實很簡單的,只要在
 <head>...</head>的中間加一行

<meta http-equiv="refresh" content="10;url=xxx.htm">

 content後面的數字     代表等待的秒數。
 xxx.htm               代表你想要開啟的新網頁位置


 ex.

<head>
<meta http-equiv="refresh" content="7;url=http://htms.cjb.net">
</head>


 看範例結果


動態的跑馬燈

 這個效果只有IE支援,用Netscape就看不到了。

<marquee direction="left" behavior="alternate">
文字
</marquee>
    
 解說如下

<marquee>...</marquee>
 跑馬燈內容的開始與結束。

direction=
 指定跑馬燈行進的方向,left和right分別代表向左與向右。

behavior=
 指定跑馬燈的形式。
 (1) 如果不加這個屬性,預設值為捲動,也就是跑馬燈遇到障礙時
     ,會從另一端重新出現,且重複剛剛的動作。
 (2) behavior="slide",表示滑動,遇到障礙立刻停止不動。
 (3) behavior="alternate",表示交錯,也就是用到障礙時,會立
     刻反彈,然後往反方向前進。

 ex.

 <marquee direction="left">
 我向左捲動
 </marquee>

 <marquee direction="right" behavior="slide">
 我向右滑動
 </marquee>

 <marquee direction="left" behavior="alternate">
 我向左交錯
 </marquee>


 看範例結果


回上一章 互動表單      到下一章 重點表列