最近本人在研究别人代码的时候,发现有些地方用到document这个对象,请问关于这个document一般用在什么地方?
难道是处理文件方面的吗?他有哪些方法?有谁能详细得跟我讲解下,谢谢了~
难道是处理文件方面的吗?他有哪些方法?有谁能详细得跟我讲解下,谢谢了~
解决方案 »
- 问个struts2的我感觉模糊的问题
- quartz的定时功能在windows下有效,在linux下无效
- struts result 关于chain的一个小问题
- 谁帮我解决下编译的问题
- org.hibernate.hql.ast.QuerySyntaxError: expecting CLOSE
- tomcat数据库连接池应该装什么驱动啊
- 一个jdom的bug!!!!,以前提过,现在再贴。
- 怎么设定从xml转换成html后的缺省字符集?
- 哪里有“J2EE构建企业系统”书下载的???
- 反射
- jconnect6 连接sybase iq 15 问题
- JSTL标签取值问题,配合Struts2,急用,在线等。。。。。。。。。。。
You can load a new document by setting the Window.location property.You can clear the document pane (and remove the text, form elements, and so on so they do not redisplay) with these statements:document.close();
document.open();
document.write(); You can omit the document.open call if you are writing text or HTML, since write does an implicit open of that MIME type if the document stream is closed.You can refer to the anchors, forms, and links of a document by using the anchors, forms, and links arrays. These arrays contain an entry for each anchor, form, or link in a document and are properties of the document object.Do not use location as a property of the document object; use the document.URL property instead. The document.location property, which is a synonym for document.URL, will be removed in a future release.
貌似楼主看到的是 JavaScript 的document ......不是 Java 里的document如果是Javascript里边的document 那么这个document指的就是整个html页面 。 因为html页面是xml的子类。 所以html也是类似树形结构的 , 可以使用javascript 以访问xml的形式访问html .document.getElementById()是访问节点效率最高的。
由于dom访问的方式是冒泡式遍历 所以也会出现 事件冒泡 用JavaScript处理事件时应当注意,取消事件冒泡在IE和firfox不同。又啰嗦一堆