网页常用特效整理:中级篇

作者:佚名 时间:2013-07-15 13:43:32 

    笔者日积月累了许多精彩、实用的Web特效的制作,这些特效几乎都是比较常用的网页特效。现在我就把这些经过整理和修改过的特效分三个级别分别介绍给大家。
  中级篇

  1.节日倒计时
  <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>
  2.单击按钮打印出当前页
  <Script  Language="JavaScript">
  <!-- Begin
  if (window.print) {
  document.write('<form>'
  + '<input type=button name=print value="打印本页" '
  + 'onClick="javascript:window.print()"></form>');
  }
  // End -->
  </Script>
  3.单击按钮‘另存为’当前页
  <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-A96B-00C04FD705A2">
  <embed width="0"   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: 宋体'> ",
  today.getYear(),"年",today.getMonth()+1,"月",today.getDate(),"日",
  d[today.getDay()+1],"</font>" );
  </script>

标签:
0
投稿

猜你喜欢

  • 10个糟糕的IE Bug及其修复

    2010-05-13 16:26:00
  • php strftime函数的详细用法

    2023-06-07 19:09:37
  • phar绕过phar与HALT实现文件上传功能

    2023-05-25 06:47:36
  • PHP生成饼图的示例代码

    2023-05-25 10:24:09
  • 关于大批量数据高效插入方法

    2010-07-31 19:07:00
  • MySQL数据库常见的出错代码及出错信息

    2008-05-27 12:29:00
  • Excel VBA连接并操作Oracle

    2009-08-08 22:58:00
  • SQL和Oracle对数据库事务处理的差异性

    2009-10-14 09:43:00
  • WEB2.0网页制作标准教程(2)什么是名字空间

    2007-11-13 13:04:00
  • 如何用Cookie进行登录验证?

    2010-06-12 12:34:00
  • js截取字符串的方法

    2008-04-20 17:06:00
  • asp 删除数据并同时删除图片的代码

    2011-02-28 10:39:00
  • 讲解设计应用程序时避免阻塞的八个准则

    2009-01-04 14:16:00
  • ASP使用缓存方法及缓存类详解

    2008-02-15 08:36:00
  • SQL语句操作主从关系表

    2011-06-19 13:19:05
  • 怎样在MySQL数据库中导出整个数据库

    2008-12-31 15:13:00
  • JS+ASP实现无刷新新闻列表之分页

    2007-08-22 12:57:00
  • PHP和JavaScrip分别获取关联数组的键值示例代码

    2023-06-16 05:30:51
  • 搜索结果页(SERP):前言

    2009-07-22 20:56:00
  • sqlserver获取当前日期的最大时间值

    2011-09-30 11:44:50
  • asp之家 网络编程 m.aspxhome.com