JavaScript經典教程.docVIP

  1. 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
  2. 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  3. 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
  4. 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
  5. 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们
  6. 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
  7. 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
JavaScript經典教程

? ?   初学乍练 ? 日期显示 数字时钟1 数字时钟2 辨别浏览器 分时问候 停留时间显示1 最后修改时间 随时间产生图片 离开时启动收藏夹 前后翻页 开启新窗口 全屏显示 查看源代码 背景不动 页面自动跳转 禁止使用右键 导航条式菜单 倒计时显示 标题栏显示日期 页面自动更新 背景居中 禁止下载图片 会变色的菜单 ?   驾轻就熟 ? 状态栏时间显示 图片淡入淡出 页面自动滚动 跑马灯2 显示页面内链接 解释型菜单 地震效果 窗口从上落下 随机产生图片 图形随窗口移动 滚动导航菜单 状态栏显示链接内容 停留时间显示2 带开关的时钟 文字上下移动 带阴影的时钟 状态栏显示输入内容 ? ? ?   一代宗师 ? 推拉式菜单 闪烁文字 跑马灯1 页面载入方式 树型目录菜单 旋转文字 可拖动的图片 页面自动更新2   寂寞高手 ? 文字跟随鼠标 星星跟随鼠标 图片跟随鼠标 滚动显示图片 文字渐隐渐现 ? ? ?      日期星期的显示 今天是 2009年11月18日 星期三 ? ? 这段程序放在body与/body之间!-- todayDate = new Date(); date = todayDate.getDate(); month= todayDate.getMonth() +1; year= todayDate.getYear(); document.write(今天是) document.write(br) if(navigator.appName == Netscape) { document.write(1900+year); document.write(年); document.write(month); document.write(月); document.write(date); document.write(日); document.write(br) } if(navigator.appVersion.indexOf(MSIE) != -1) { document.write(year); document.write(年); document.write(month); document.write(月); document.write(date); document.write(日); document.write(br) } if (todayDate.getDay() == 5) document.write(星期五) if (todayDate.getDay() == 6) document.write(星期六) if (todayDate.getDay() == 0) document.write(星期日) if (todayDate.getDay() == 1) document.write(星期一) if (todayDate.getDay() == 2) document.write(星期二) if (todayDate.getDay() == 3) document.write(星期三) if (todayDate.getDay() == 4) document.write(星期四)//-- todayDate = new Date(); 当定义一个新的对象时,通常使用“new”操作符。在这里,就是创建了日期对象。 date = todayDate.getDate(); getDate()是Date对象的一种方法,其功能是获得当前的日期。 month= todayDate.getMonth() + 1 ; ; getMonth()是Date对象的一种方法,其功能是获得当前的日期,由于月份是从0开始的,所以这里要“+1”。 year= todayDate.getYear() getYear()是Date对象的一种方法,其功能是获得当前的年份。 document.write(今天是) document.write(br) 输出“今天是” if(navigator.appName == Netscape) { document.write(1900+year); document.write(年); document.write(month); document.write(月); document.write(date); document.write(日); document.write(br ) } 如果浏览器是Netscape,输出今天是“yea

文档评论(0)

sd47f8cI + 关注
实名认证
文档贡献者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档