`

HTML DOM Document

    博客分类:
  • HTML
阅读更多

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

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics