JavaScript(修改).pptVIP

  • 4
  • 0
  • 约2.47万字
  • 约 106页
  • 2016-12-19 发布于贵州
  • 举报
高级翻转器 function rollout() { this.src=this.outImage.src; } function rollover() { this.src=this.overImage.src; } 优点:一次性将图片下载到客户段 的内存当中,不会出现延时。 链接式翻转器 window.onload=setup; function setup(){ var thislinks= document.links[0];//获取链接对象 thislinks.thisImage=document.images[0];//定义属性 thislinks.outImage=new Image(); thislinks.outImage.src=thisImage.src; thislinks.onmouseout=rollout; thislinks.overImage=new Image(); thislinks.overImage.src=arrow_on.jpg; thislinks.onmouseover=rollover; } 链接式翻转器 function rollout() { this.thisImage.src=this.outImage.src; } function rollover() { this.thisImage.src=this.overImage.src; } 三状态翻转器 三状态翻转器就是在高级翻转器中加入一条点击的过程中出现的图片; thisImage.onclickImage=new Image(); thisImage.onclickImage.src=图片地址; thisImage.onclick=rollClick; function rollClick() { this.src=this.onclickImage.src; } 七 .框架 框架概述 框架由至少三个HTML页面组成。第一个页面称为框架集(frameset),它设置每个子框架的尺寸。框架集在JavaScirpt中称为顶层页面(top)或父页面(parent)。 框架集 left 框架 content 框架 一个简单的框架 html head /head frameset cols=30%,70% frame src=1.html name=left id=left scrolling=yes noresize/ frame src=2.html name=content id=content / /frameset /html scrolling:是否显示滚动条 noresize:是否允许调整框架 大小 防止页面显示在框架中 抢劫 我的页面 新 闻网 页贴 吧知 道MP3图 片视 频 帮助 高级 空间 hao123 | 更多 把百度设为首页 企业推广 | 搜索风云榜 | 关于百度 | About Baidu ?2008 Baidu 使用百度前必读 京ICP证030173号 百度一下 if(top.location!=self.location){ top.location.replace(self.location); } 注意:直接用top.location!=self.location IE的Back按钮不能用 防止 迫使站点显示在框架中 if (top.location == self.location) { top.location.href = self.location.href; } 检查top.location是否与self.location相同 八.事件处理 作业 定义一个对象,完成时间、email、url、银行账号等的验证。 试完成一个在当前网页上弹出的对话框。 数组和对象 由于所有的数组也是对象,也支持expando属性。请注意,虽然如此,添加的属性并不以任何方式与 length 属性相交互。例如: // 三个元素的数组 var myArray = new Array(3); myArray[0] = Hello; myArray[1] = 42; myArray[2] = new Date(2000, 1, 1)

文档评论(0)

1亿VIP精品文档

相关文档