摘要: top:该变更永远指分割窗口最高层次的浏览器窗口。如果计划从分割窗口的最高层次开始执行命令,就可以用top变量。parent:该变量指的是包含当前分割窗口的父窗口。如果在一个窗口内有分割窗口,而在其中一个分割窗口中又包含着分割窗口,则第2层的分割窗口可以用parent变量引用包含它的父分割窗口。附:Window对象、Parent对象、Frame对象、Document对象和Form对象的阶层关系Windwo对象→Parent对象→Frame对象→Document对象→Form对象,如下:parent.frame1.document.forms[0].elements[0].value; 阅读全文
posted @ 2011-09-21 16:31 wkylin 阅读(945) 评论(0) 推荐(0) 编辑
摘要: nodeType nodeName nodeValue实例测试注意:nodeName总是返回一个大写字母的值,即使元素在Html文档里是小写字母。 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"> <head> <me 阅读全文
posted @ 2011-09-21 16:17 wkylin 阅读(384) 评论(0) 推荐(0) 编辑
摘要: document.all[]是文档中所有标签组成的一个数组变量,包括了文档对象中所有元素.IE's document.all collection exposes all document elements.This array provides access to every element in the document. document.all[]这个数组可以访问文档中所有元素。function fnNavigate(){ for(i=0;i<document.all.length;i++) { if(document.all(i).tagName=="IFR. 阅读全文
posted @ 2011-09-21 14:26 wkylin 阅读(241) 评论(0) 推荐(0) 编辑
摘要: 转自:天芒1 function adjustIFramesHeightOnLoad(iframe) {2 var iframeHeight = Math.min(iframe.contentWindow.window.document.documentElement.scrollHeight, iframe.contentWindow.window.document.body.scrollHeight);3 $(iframe).height(iframeHeight);4 } 阅读全文
posted @ 2011-09-21 13:41 wkylin 阅读(624) 评论(0) 推荐(0) 编辑
摘要: <javascritp type="text/javascript"> var arr = [0,1,2,3,4]; var length=arr.length; var randomIndex=Math.floor(Math.random()*length); alert(randomIndex);</javascript> 阅读全文
posted @ 2011-09-21 13:16 wkylin 阅读(194) 评论(0) 推荐(0) 编辑