学学习网 手机版

学学习网

学习路径: 学习首页 > 设计工具 > dreamweaver >

Dreamwear设计常用代码 12-16

设置字体:
----------------------------------
 12.添加到收藏夹和设为首页
<a href=# >设为首页</a>
<a href="javascript:window.external.AddFavorite('http://www.xuexuexi.com.com/','站长设计网')">收藏本站</a>
-------------------------------------------------------------------------------

 13.记录并显示网页的最后修改时间
<script language=JavaScript>
document.write("最后更新时间: " + document.lastModified + "")
</script>
-------------------------------------------------------------------------------

 14.节日倒计时
<Script Language="JavaScript">
   var timedate= new Date("October 1,2002");
   var times= "国庆节";
   var now = new Date();
   var date = timedate.getTime() - now.getTime();
   var time = Math.floor(date / (1000 * 60 * 60 * 24));
   if (time >= 0)
   document.write( "现在离"+times+"还有: "+time +"天")
</Script>
-------------------------------------------------------------------------------

 15.加在HEAD里
禁止缓存
<meta http-equiv="Expires" CONTENT="0">
<meta http-equiv="Cache-Control" CONTENT="no-cache">
<meta http-equiv="Pragma" CONTENT="no-cache">
-------------------------------------------------------------------------------

 16.让IFRAME框架内的文档的背景透明
<iframe src="about:<body style='background:transparent'>" allowtransparency></iframe>
-------------------------------------------------------------------------------
----------------------------------
课程列表
重点难点
赞助链接