HTML DOM Document Object
一、Document是Window对象的一部分,用window.document访问,Document对象可以访问Html文档的所有元素
二、Document的集合
①all[]
document.all[],document.all[name],document.all.tags[tagname]
以上被getElementById、getelementByName、getElementByTagName等取代
②anchors所有anchor(锚)的引用
③forms[]所有form
④images[]
⑤links[]所有Area和Link
三、属性
①body
②cookie
③domain当前文档的域名
④lastModified文档被修改的最后时间
⑤referrer当前文档的URL
⑥title
⑦URL
四、方法
①close关闭open方法打开的文档流,强制现实缓存内容,在write之后使用
②getElementById
③getElementByName
④getElementByTagName
⑤open
⑥write/writeln
本文深入探讨HTMLDOMDocumentObject的核心概念,包括文档对象模型的集合、属性与方法,详细解析如何通过JavaScript操作HTML文档,提供DOM元素的访问与管理技巧。
1260

被折叠的 条评论
为什么被折叠?



