筆者日積月累了許多精彩、實用的Web特效的製作,這些特效幾乎都是比較常用的網頁特效。現在我就把這些經過整理和修改過的特效分三個等級分別介紹給大家。
中級篇
1.節慶倒數
<Script Language="JavaScript">
var timedate= new Date("October 1,2002");
var times="="s="a); timedate .getTime() - now.getTime();
var time = Math.floor(date / (1000 * 60 * 60 * 24));
if (time >= 0)
〔document" times+"還有: "+time +"天")</Script>
2.點選按鈕列印出目前頁面
<Script Language="JavaScript">
<!-- Begin
if (window.print) {
〜〜〜〜<<<. name =print value="列印本頁" '
+ 'onClick="javascript:window.print()"></form>');
}
// End -->
〞㟎點選按鈕'另存為'目前頁面
<input type="button" name="Button" value="儲存本頁"
onClick="document.all.button.ExecWB(4,1)"> object id="button"
width=0
height=0
classid="CLSID:8856F961-340A-11D0-A966-00C04FD2705" height="0"></embed>
</object>
4.顯示系統當前日期
<script language=JavaScript>
today=new Date();
function date(){
this.length=date.arguments.length
for(var i=0;i<this.length; i++)
this[i+1]=date.arguments[i] }
var d=new date("星期日","星期一","星期二","星期三","星期四","星期五","星期六");
document.write(
"<font color=##000000 style='font-size:9pt;font-family: 宋體'> ",
天. ()+1,"月",today.getDate(),"日",
d[today.getDay()+1],"</font>" );
</script>
特效整理:中級篇的內容,更多相關內容請關注PHP中文網(www.php.cn)!