document对象常⽤的属性和⽅法⼀、对象的属性
1.document.title //设置⽂档的标题(HTML的title标签)
2.document.bgColor //设置背景页⾯的颜⾊
3.document.fgColor //设置前景⾊(⽂本颜⾊)
4.documen.URL //设置URL属性在同⼀个窗⼝打开其他页⾯
5.document.linkColor //未点击过的链接颜⾊
kie //设置和读出cookie
7.document.fileSize //设置⽂件⼤写,(注:只读属性)
8.document.charset //设置字符集
9.document.alinkColor //激活链接颜⾊(注:焦点在链接上)
10.document.vlinkColor //已点击过的链接颜⾊
11.document.fileCreatedData //⽂件创建⽇期(注:只读属性)
12.document.ModifiedDate //⽂件修改⽇期(注:只读属性)
⼆、常⽤的对象的⽅法
1.document.write() //动态向页⾯添加内容html document是什么
ateElement(Tag) //创建⼀个html标签对象
ElementById(ID) //获得指定Id的对象
ElementByClassName(className) //获得指定class值的对象(数组)
ElementByTagName(TagName) //获得指定的tag对象
6.document.body.appendChild(Tag) //向body中添加创建的新的标签对象
ElementByName(Name) //获得指定的Name值的对象

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。