加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 创业 > C语言 > 正文

HTML中的Window和document的属性

发布时间:2020-12-15 00:36:21 所属栏目:C语言 来源:网络整理
导读:table class="text" tr class="li1" td class="ln"pre class="de1"1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
<tr class="li1">
<td class="ln"><pre class="de1">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130

0进步,i<0 后退   ------------------------------------------------- -------------------   window.screen对象  window.screen.width //屏幕宽度   window.screen.height //屏幕高度   window.screen.colorDepth //屏幕色深   window.screen.availWidth //可用宽度   window.screen.availHeight //可用高度(除去任务栏的高度)   -------------------------------------------------- -------------------   window.external对象   window.external.AddFavorite("地址","标题" ) //把网站新增到保藏夹   -------------------------------------------------- -------------------   window.navigator对象   window.navigator.appCodeName //浏览器代码名   window.navigator.appName //浏览器应用程序名   window.navigator.appMinorVersion //浏览器补丁版本   window.navigator.cpuClass //cpu类型 x86   window.navigator.platform //操作体系类型 win32   window.navigator.plugins   window.navigator.opsProfile   window.navigator.userProfile   window.navigator.systemLanguage //客户体系语言 zh-cn简体中文   window.navigator.userLanguage //用户语言,同上   window.navigator.appVersion //浏览器版本   window.navigator.userAgent   window.navigator.onLine //用户否在线   window.navigator.cookieEnabled //浏览器是否撑持cookie   window.navigator.mimeTypes document对象 -- 代表整个HTML 文档,可用来访问页面中的所有元素: 对象属性 document.title //设置文档标题等价于HTML的标签 document.bgColor //设置页面背景色 document.fgColor //设置前景色(文本颜色) document.linkColor //未点击过的链接颜色 document.alinkColor //激活链接(焦点在此链接上)的颜色 document.vlinkColor //已点击过的链接颜色 document.URL //设置URL属性从而在同一窗口打开另一网页 document.fileCreatedDate //文件建立日期,只读属性 document.fileModifiedDate //文件修改日期,只读属性 document.fileSize //文件大小,只读属性 document.cookie //设置和读出cookie document.charset //设置字符集 简体中文:gb2312 常用对象方法 document.write() //动态向页面写入内容 document.createElement(Tag) //创建一个html标签对象 document.getElementById(ID) //获得指定ID值的对象 document.getElementsByName(Name) //获得指定Name值的对象 document.body.appendChild(oTag) body-主体子对象 document.body //指定文档主体的开始和结束等价于<body></body> document.body.bgColor //设置或获取对象后面的背景颜色 document.body.link //未点击过的链接颜色 document.body.alink //激活链接(焦点在此链接上)的颜色 document.body.vlink //已点击过的链接颜色 document.body.text //文本色 document.body.innerText //设置<body>...</body>之间的文本 document.body.innerHTML //设置<body>...</body>之间的HTML代码 document.body.topMargin //页面上边距 document.body.leftMargin //页面左边距 document.body.rightMargin //页面右边距 document.body.bottomMargin //页面下边距 document.body.background //背景图片 document.body.appendChild(oTag) //动态生成一个HTML对象 常用对象事件 document.body.onclick="func()" //鼠标指针单击对象是触发 document.body.onmouSEOver="func()" //鼠标指针移到对象时触发 document.body.onmouSEOut="func()" //鼠标指针移出对象时触发 location-位置子对象 document.location.hash // #号后的部分 document.location.host // 域名+端口号 document.location.hostname // 域名 document.location.href // 完整URL document.location.pathname // 目录部分 document.location.port // 端口号 document.location.protocol // 网络协议(http:) document.location.search // ?号后的部分 常用对象事件 documeny.location.reload() //刷新网页 document.location.reload(URL) //打开新的网页 document.location.assign(URL) //打开新的网页 document.location.replace(URL) //打开新的网页 ? selection-选区子对象 document.selection ? images集合(页面中的图象): ---------------------------- a)通过集合引用 document.images //对应页面上的<img>标签 document.images.length //对应页面上<img>标签的个数 document.images[0] //第1个<img>标签 document.images[i] //第i-1个<img>标签 ---------------------------- b)通过nane属性直接引用 <img name="oImage"> document.images.oImage //document.images.name属性 ---------------------------- c)引用图片的src属性 document.images.oImage.src //document.images.name属性.src</pre></td> </tr></tbody></table> <p style="text-align:right;">(编辑:李大同)</p> <p style="text-align:right;">【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!</p> </td> </tr> </table> </div> <div class="dede_pagess"><ul class="pagelist"></ul></div> <div class="ad-690"><script src='https://ess.0577qiche.com/d/js/acmsd/ad76.js' language='javascript'></script></div> <div class="g-box10"> <div class="t-2">相关内容</div> <ul class="b-box12"></ul> <ul class="b-box13"><li><a href="https://www.lidatong.com.cn/html/chuangye/C/2020/1215/301099.html" target="_blank">友情链接是门学问 适合与否需要分析</a></li><li><a href="https://www.lidatong.com.cn/html/chuangye/C/2020/1215/288347.html" target="_blank">ios safari audio自动播放</a></li><li><a href="https://www.lidatong.com.cn/html/chuangye/C/2020/1215/282136.html" target="_blank">ng-mouse指令</a></li><li><a href="https://www.lidatong.com.cn/html/chuangye/C/2020/1215/286843.html" target="_blank">C语言数据结构之堆排序源代码</a></li><li><a href="https://www.lidatong.com.cn/html/chuangye/C/2020/1215/285890.html" target="_blank">Linux系统下使用rpm方式安装最新mysql5.7.17完整步骤</a></li><li><a href="https://www.lidatong.com.cn/html/chuangye/C/2020/1215/284386.html" target="_blank">storage 的方法</a></li><li><a href="https://www.lidatong.com.cn/html/chuangye/C/2020/1215/305330.html" target="_blank">web下载文件和跳转的方法</a></li><li><a href="https://www.lidatong.com.cn/html/chuangye/C/2020/1215/303558.html" target="_blank">Google:Search?Engine?Optimization?S</a></li><li><a href="https://www.lidatong.com.cn/html/chuangye/C/2020/1215/285046.html" target="_blank">Apache下开启SSI配置使html支持include包含的方法</a></li><li><a href="https://www.lidatong.com.cn/html/chuangye/C/2020/1215/302466.html" target="_blank">如何使用百度广告管家设置投放漂浮广告</a></li><div class="cl"></div></ul> </div> </div> </div> <div class="right-1 fr"> <div class="g-box8"> <div class="t-2">推荐文章</div> <ul></ul> </div> <div class="g-box11"> <div class="t-2">站长推荐</div> <ul class="b-box7"><li><a href="https://www.lidatong.com.cn/html/chuangye/C/2020/1215/284230.html" target="_blank">面向对象的封装</a></li><li><a href="https://www.lidatong.com.cn/html/chuangye/C/2020/1215/299316.html" target="_blank">帮助谷歌收录你的手机网站</a></li><li><a href="https://www.lidatong.com.cn/html/chuangye/C/2020/1215/299600.html" target="_blank">个人站长卖站的几个注意事项</a></li><li><a href="https://www.lidatong.com.cn/html/chuangye/C/2020/1215/288079.html" target="_blank">webpack4系列笔记二:配置HTML</a></li><li><a href="https://www.lidatong.com.cn/html/chuangye/C/2020/1215/283371.html" target="_blank">JS语法:callee caller arguments</a></li><li><a href="https://www.lidatong.com.cn/html/chuangye/C/2020/1215/280527.html" target="_blank">以精准流量代替泛流量!</a></li><li><a href="https://www.lidatong.com.cn/html/chuangye/C/2020/1215/286982.html" target="_blank">Linux 开发环境中为VirtualBox安装增强功能</a></li><li><a href="https://www.lidatong.com.cn/html/chuangye/C/2020/1215/288631.html" target="_blank">[笔记]parseInt在IE8下的异常</a></li><li><a href="https://www.lidatong.com.cn/html/chuangye/C/2020/1215/306260.html" target="_blank">Apache shiro的简单介绍与使用教程(与spring整合</a></li><li><a href="https://www.lidatong.com.cn/html/chuangye/C/2020/1215/285624.html" target="_blank">非常漂亮的新年祝福!C语言实现漂亮的烟花效果</a></li></ul> </div> <script type="text/javascript">jQuery(".g-box8").slide({ titCell:"li",triggerTime:0 }); </script> <div class="ad-250"><script src='https://ess.0577qiche.com/d/js/acmsd/ad103.js' language='javascript'></script></div> <div class="g-box3 u-3"> <div class="t-1">热点阅读</div> <ul class="b-box2"></ul> </div> <div class="ad-250"><script src='https://ess.0577qiche.com/d/js/acmsd/ad77.js' language='javascript'></script></div> </div> <div class="cl"></div> </div> <div class="ad-960"><script src='https://ess.0577qiche.com/d/js/acmsd/ad78.js' language='javascript'></script></div> <div class="footer"> <p>【免责声明】本站内容转载自互联网,其发布内容言论不代表本站观点,如果其链接、内容的侵犯您的权益,烦请提交相关链接至邮箱bqsm@foxmail.com我们将及时予以处理。</p> <p>建议您使用1920×1080分辨率、谷歌浏览器Google Chrome、Microsoft Edge以获得本站的最佳浏览效果</p> <p>Copygight © 2008-2022 https://www.lidatong.com.cn/ All Rights Reserved. 李大同</p> <p><script type="text/javascript" src="//js.users.51.la/21280179.js"></script></p> </div> </body> </html>

<table class="text">