document是dom树中的一个级别,在它的上面是window,一般我们都输入是document.
其实是window.document
document的对象集合document.forms[]表单,document.links[]链接,document.images[]图像,默认还有all[]
document的属性document.cookie;document.domain
document.lastModified;document.referrer(之前也的URL,可以做盗链处理);
document.title(当前标题);document.URL(当前URL)
关键的document的三大方法,用来操作dom元素的
getElementById()指定id
getElementsByName()指定名称
getElementsByTagName()指定标签名
document的扩展是HTMLDocument