📄 document 对象的常用方法.mht
字号:
}=0A=
=0A=
xhr.open("GET", =
"/sys/search?type=3D8&word=3Djavascript%20document%20%CA%F4%D0%D4%A1%A2%B=
7%BD%B7%A8&item=3D47da00f0d2bc8fc47831aa43&t=3D" + new Date().getTime(), =
true); =0A=
xhr.onreadystatechange =3D function(){=0A=
if(xhr.readyState =3D=3D 4){=0A=
if(xhr.status =3D=3D 0 || xhr.status =3D=3D 200){=0A=
if(GetAndEval){=0A=
eval(xhr.responseText);=0A=
}else{=0A=
RelatedDocData =3D xhr.responseText;=0A=
}=0A=
}=0A=
}=0A=
}=0A=
xhr.send(null);=0A=
})();=0A=
/*]]>*/=0A=
</SCRIPT>
<META content=3D"MSHTML 6.00.2900.5583" name=3DGENERATOR></HEAD>
<BODY onload=3Dformatonlinpic();>
<CENTER>
<SCRIPT type=3Dtext/javascript>=0A=
/*<![CDATA[*/=0A=
if(top.location !=3D self.location){=0A=
top.location =3D self.location;=0A=
}=0A=
var myref =3D =
encodeURIComponent("http://hi.baidu.com/di%5Fwan/blog/item/47da00f0d2bc8f=
c47831aa43%2Ehtml");=0A=
/*]]>*/=0A=
</SCRIPT>
<LINK href=3D"http://hi.baidu.com/ui/css/mods.css" type=3Dtext/css=20
rel=3Dstylesheet><LINK=20
href=3D"http://hi.baidu.com/di%5Fwan/css/item/b96fd7517352eb8f8d543046.cs=
s"=20
type=3Dtext/css rel=3Dstylesheet><LINK =
href=3D"http://hi.baidu.com/space.css"=20
type=3Dtext/css rel=3Dstylesheet>
<STYLE type=3Dtext/css>#usrbar {
PADDING-RIGHT: 10px; PADDING-LEFT: 0px; FONT-SIZE: 12px; BACKGROUND: =
#ffffff; FILTER: alpha(opacity=3D65); PADDING-BOTTOM: 3px; WIDTH: 100%; =
COLOR: #000000; LINE-HEIGHT: 19px; PADDING-TOP: 4px; FONT-FAMILY: Arial; =
LETTER-SPACING: normal; HEIGHT: 19px; TEXT-ALIGN: right; moz-opacity: =
0.5
}
#usrbar A {
COLOR: #0000cc; TEXT-DECORATION: underline
}
#usrbar A:link {
COLOR: #0000cc; TEXT-DECORATION: underline
}
#usrbar A:visited {
COLOR: #0000cc; TEXT-DECORATION: underline
}
#ft {
CLEAR: both; FONT-SIZE: 12px; COLOR: #666666; LINE-HEIGHT: 20px; =
FONT-FAMILY: Arial; HEIGHT: 20px; TEXT-ALIGN: center
}
#ft A {
COLOR: #7777cc; TEXT-DECORATION: underline
}
#ft A:link {
COLOR: #7777cc; TEXT-DECORATION: underline
}
#ft A:visited {
COLOR: #7777cc; TEXT-DECORATION: underline
}
#usrbar {
LETTER-SPACING: normal
}
#usrbar A {
LETTER-SPACING: normal
}
#usrbar A:link {
LETTER-SPACING: normal
}
#usrbar A:visited {
LETTER-SPACING: normal
}
#ft {
LETTER-SPACING: normal
}
#ft A {
LETTER-SPACING: normal
}
#ft A:link {
LETTER-SPACING: normal
}
#ft A:visited {
LETTER-SPACING: normal
}
</STYLE>
<DIV id=3Dusrbar><NOBR><A href=3D"http://www.baidu.com/" =
target=3D_blank>=B0=D9=B6=C8=CA=D7=D2=B3</A> | <A=20
id=3Dhi_index href=3D"http://hi.baidu.com/" =
target=3D_blank>=B0=D9=B6=C8=BF=D5=BC=E4</A>
<SCRIPT type=3Dtext/javascript>=0A=
document.write('| <a =
href=3D"http://passport.baidu.com/?login&tpl=3Dsp&tpl_reg=3Dsp&u=3Dhttp:/=
/hi.baidu.com' + =
encodeURIComponent('/di%5Fwan/blog/item/47da00f0d2bc8fc47831aa43%2Ehtml')=
+ '">=B5=C7=C2=BC</a>');=0A=
</SCRIPT>
</NOBR></DIV>
<DIV id=3DnewUserTip=20
style=3D"Z-INDEX: 30000; RIGHT: 0px; FLOAT: right; WIDTH: 220px; =
POSITION: absolute; TOP: 26px; HEIGHT: 90px; TEXT-ALIGN: right"><A=20
id=3DnewUserTipShadow=20
style=3D"DISPLAY: block; FONT-SIZE: 14px; Z-INDEX: 30001; RIGHT: 120px; =
BACKGROUND: none transparent scroll repeat 0% 0%; OVERFLOW: hidden; =
WIDTH: 55px; COLOR: #4242f9! important; POSITION: absolute; TOP: 68px; =
HEIGHT: 14px; TEXT-DECORATION: none! important"=20
onclick=3DnewUserRegLog()=20
href=3D"http://passport.baidu.com/?reg&tpl=3Dsp&return_method=3Dg=
et&skip_ok=3D1&u=3Dhttp://hi.baidu.com/sys/reg/"=20
target=3D_blank> &nb=
sp; </A>=20
<EMBED id=3DnewUserTipSwf style=3D"WIDTH: 220px; HEIGHT: 90px"=20
src=3Dhttp://hi.baidu.com/ui/flash/userReg/guide.swf=20
type=3Dapplication/x-shockwave-flash wmode=3D"transparent"=20
allowScriptAcess=3D"always"> </DIV>
<SCRIPT language=3Djavascript>=0A=
<!--=0A=
=0A=
function newUserTipShow(f)=0A=
{=0A=
if(f=3D=3D"0"){//close=0A=
G("newUserTipSwf").style.width=3D"40px";=0A=
G("newUserTip").style.width=3D"40px"; =0A=
G("newUserTipShadow").style.display=3D"none";=0A=
}else{//show=0A=
G("newUserTip").style.width=3D"220px";=0A=
G("newUserTipSwf").style.width=3D"220px";=0A=
G("newUserTipShadow").style.display=3D"block";=0A=
=0A=
}=0A=
}=0A=
=0A=
function newUserRegLog(){=0A=
=0A=
}=0A=
//-->=0A=
</SCRIPT>
<SCRIPT type=3Dtext/javascript>=0A=
=0A=
function set_cookie_4_bdtip(index/* start from one */, value){=0A=
var bdtip =3D document.cookie.match(/(^| )BDTIP=3D([^;]*)(;|$)/);=0A=
if(!bdtip){=0A=
bdtip=3Dnew Array(index);=0A=
for(var i=3D0,n=3Dbdtip.length;i<n;i++)=0A=
{=0A=
if(bdtip[i]=3D=3D"" || bdtip[i]=3D=3Dnull) bdtip[i]=3D0;=0A=
if(i =3D=3D index - 1){=0A=
bdtip[i] =3D value;=0A=
}=0A=
}=0A=
}else{=0A=
bdtip =3D bdtip[2].split('-');=0A=
if(index > bdtip.length) bdtip.length=3D index;=0A=
for(var i =3D 0, j =3D bdtip.length; i < j; i ++){=0A=
if(bdtip[i]=3D=3D"" || bdtip[i]=3D=3Dnull) bdtip[i]=3D0;=0A=
if(i =3D=3D index - 1){=0A=
bdtip[i] =3D value;=0A=
}=0A=
}=0A=
}=0A=
bdtip =3D bdtip.join('-');=0A=
document.cookie =3D "BDTIP=3D" + bdtip+ ";expires=3DWed, 28-Nov-37 =
01:45:46 GMT;path=3D/;domain=3D.baidu.com";=0A=
}=0A=
</SCRIPT>
<DIV id=3Dmain align=3Dleft><!--[if IE]>
<SCRIPT>
var objmain =3D document.getElementById("main");
function updatesize(){ var bodyw =3D window.document.body.offsetWidth; =
if(bodyw <=3D 790) objmain.style.width=3D"772px"; else if(bodyw >=3D =
1016) objmain.style.width=3D"996px"; else objmain.style.width=3D"100%"; =
}
updatesize(); window.onresize =3D updatesize;
</SCRIPT>
<![endif]-->
<DIV id=3Dheader>
<DIV class=3Dlc>
<DIV class=3Drc></DIV></DIV>
<DIV class=3Dtit><A class=3Dtitlink title=3D"di_wan=B5=C4=BF=D5=BC=E4 =
http://hi.baidu.com/di_wan"=20
href=3D"http://hi.baidu.com/di_wan">=C1=F0=C1=A7=D0=C4</A></DIV>
<DIV =
class=3Ddesc>=C3=CE=C0=EF=BB=A8=C2=E4=D6=AA=B6=E0=C9=D9=A3=AC=C4=AC=C8=BB=
=BB=D8=CA=D7=A1=A3=A1=A3=A1=A3=C4=C7=C8=CB=C8=B7=D4=DA=D4=C6=C9=EE=B2=BB=D6=
=AA=B4=A6</DIV>
<DIV id=3Dtabline></DIV>
<DIV id=3Dtab><A href=3D"http://hi.baidu.com/di_wan">=D6=F7=D2=B3</A><A =
class=3Don=20
href=3D"http://hi.baidu.com/di_wan/blog">=B2=A9=BF=CD</A><A=20
href=3D"http://hi.baidu.com/di_wan/album">=CF=E0=B2=E1</A><SPAN>|</SPAN><=
A=20
href=3D"http://hi.baidu.com/di_wan/profile">=B8=F6=C8=CB=B5=B5=B0=B8</A> =
<SPAN>|</SPAN><A=20
href=3D"http://hi.baidu.com/di_wan/friends">=BA=C3=D3=D1</A> =
</DIV></DIV>
<DIV class=3Dstage>
<DIV class=3Dstagepad>
<DIV style=3D"WIDTH: 100%">
<TABLE class=3Dmodth cellSpacing=3D0 cellPadding=3D0 width=3D"100%" =
border=3D0>
<TBODY>
<TR>
<TD class=3Dmodtl width=3D7> </TD>
<TD class=3Dmodtc noWrap>
<DIV class=3Dmodhead><SPAN =
class=3Dmodtit>=B2=E9=BF=B4=CE=C4=D5=C2</SPAN></DIV></TD>
<TD class=3Dmodtc noWrap align=3Dright></TD>
<TD class=3Dmodtr width=3D7> </TD></TR></TBODY></TABLE>
<DIV class=3Dmodbox id=3Dm_blog>
<DIV class=3Dtit>javascript document =
=CA=F4=D0=D4=A1=A2=B7=BD=B7=A8</DIV>
<DIV class=3Ddate>2008-11-13 15:37</DIV>
<TABLE style=3D"TABLE-LAYOUT: fixed">
<TBODY>
<TR>
<TD>
<DIV class=3Dcnt id=3Dblog_text>
<DIV><STRONG=20
style=3D"COLOR: black; BACKGROUND-COLOR: =
#a0ffff">document</STRONG> =CE=C4=B5=B2=B6=D4=CF=F3 -=20
<STRONG=20
style=3D"COLOR: black; BACKGROUND-COLOR: =
#ffff66">JavaScript</STRONG>=BD=C5=B1=BE=D3=EF=D1=D4=C3=E8=CA=F6<BR>-----=
----------------------------------------------------------------<BR>=D7=A2=
:=D2=B3=C3=E6=C9=CF=D4=AA=CB=D8name<STRONG=20
style=3D"COLOR: black; BACKGROUND-COLOR: =
#99ff99">=CA=F4=D0=D4</STRONG>=BA=CD<STRONG=20
style=3D"COLOR: black; BACKGROUND-COLOR: =
#ffff66">JavaScript</STRONG>=D2=FD=D3=C3=B5=C4=C3=FB=B3=C6=B1=D8=D0=EB=D2=
=BB=D6=C2=B0=FC=C0=A8=B4=F3=D0=A1=D0=B4<BR> =20
=
=B7=F1=D4=F2=BB=E1=CC=E1=CA=BE=C4=E3=D2=BB=B8=F6=B4=ED=CE=F3=D0=C5=CF=A2 =
=
"=D2=FD=D3=C3=B5=C4=D4=AA=CB=D8=CE=AA=BF=D5=BB=F2=D5=DF=B2=BB=CA=C7=B6=D4=
=CF=F3"<BR>--------------------------------------------------------------=
-------=20
<P>=B6=D4=CF=F3<STRONG=20
style=3D"COLOR: black; BACKGROUND-COLOR: =
#99ff99">=CA=F4=D0=D4</STRONG><BR><STRONG=20
style=3D"COLOR: black; BACKGROUND-COLOR: =
#a0ffff">document</STRONG>.title  =
; =20
=
//=C9=E8=D6=C3=CE=C4=B5=B5=B1=EA=CC=E2=B5=C8=BC=DB=D3=DAHTML=B5=C4<tit=
le>=B1=EA=C7=A9<BR><STRONG=20
style=3D"COLOR: black; BACKGROUND-COLOR: =
#a0ffff">document</STRONG>.bgColor &nb=
sp; =20
//=C9=E8=D6=C3=D2=B3=C3=E6=B1=B3=BE=B0=C9=AB<BR><STRONG=20
style=3D"COLOR: black; BACKGROUND-COLOR: =
#a0ffff">document</STRONG>.fgColor &nb=
sp; =20
=
//=C9=E8=D6=C3=C7=B0=BE=B0=C9=AB(=CE=C4=B1=BE=D1=D5=C9=AB)<BR><STRONG=20
style=3D"COLOR: black; BACKGROUND-COLOR: =
#a0ffff">document</STRONG>.linkColor &=
nbsp; =20
=
//=CE=B4=B5=E3=BB=F7=B9=FD=B5=C4=C1=B4=BD=D3=D1=D5=C9=AB<BR><STRONG=20
style=3D"COLOR: black; BACKGROUND-COLOR: =
#a0ffff">document</STRONG>.alinkColor =
=20
=
//=BC=A4=BB=EE=C1=B4=BD=D3(=BD=B9=B5=E3=D4=DA=B4=CB=C1=B4=BD=D3=C9=CF)=B5=
=C4=D1=D5=C9=AB<BR><STRONG=20
style=3D"COLOR: black; BACKGROUND-COLOR: =
#a0ffff">document</STRONG>.vlinkColor =
=20
=
//=D2=D1=B5=E3=BB=F7=B9=FD=B5=C4=C1=B4=BD=D3=D1=D5=C9=AB<BR><STRONG=20
style=3D"COLOR: black; BACKGROUND-COLOR: =
#a0ffff">document</STRONG>.URL &=
nbsp; =20
//=C9=E8=D6=C3URL<STRONG=20
style=3D"COLOR: black; BACKGROUND-COLOR: =
#99ff99">=CA=F4=D0=D4</STRONG>=B4=D3=B6=F8=D4=DA=CD=AC=D2=BB=B4=B0=BF=DA=B4=
=F2=BF=AA=C1=ED=D2=BB=CD=F8=D2=B3<BR><STRONG=20
style=3D"COLOR: black; BACKGROUND-COLOR: =
#a0ffff">document</STRONG>.fileCreatedDate =20
//=CE=C4=BC=FE=BD=A8=C1=A2=C8=D5=C6=DA=A3=AC=D6=BB=B6=C1<STRONG=20
style=3D"COLOR: black; BACKGROUND-COLOR: =
#99ff99">=CA=F4=D0=D4</STRONG><BR><STRONG=20
style=3D"COLOR: black; BACKGROUND-COLOR: =
#a0ffff">document</STRONG>.fileModifiedDate =20
//=CE=C4=BC=FE=D0=DE=B8=C4=C8=D5=C6=DA=A3=AC=D6=BB=B6=C1<STRONG=20
style=3D"COLOR: black; BACKGROUND-COLOR: =
#99ff99">=CA=F4=D0=D4</STRONG><BR><STRONG=20
style=3D"COLOR: black; BACKGROUND-COLOR: =
#a0ffff">document</STRONG>.fileSize &n=
bsp; =20
//=CE=C4=BC=FE=B4=F3=D0=A1=A3=AC=D6=BB=B6=C1<STRONG=20
style=3D"COLOR: black; BACKGROUND-COLOR: =
#99ff99">=CA=F4=D0=D4</STRONG><BR><STRONG=20
style=3D"COLOR: black; BACKGROUND-COLOR: =
#a0ffff">document</STRONG>.cookie &nbs=
p; =20
//=C9=E8=D6=C3=BA=CD=B6=C1=B3=F6cookie<BR><STRONG=20
style=3D"COLOR: black; BACKGROUND-COLOR: =
#a0ffff">document</STRONG>.charset &nb=
sp; =20
//=C9=E8=D6=C3=D7=D6=B7=FB=BC=AF=20
=
=BC=F2=CC=E5=D6=D0=CE=C4:gb2312<BR>--------------------------------------=
-------------------------------<BR>=B3=A3=D3=C3=B6=D4=CF=F3=B7=BD=B7=A8<B=
R><STRONG=20
style=3D"COLOR: black; BACKGROUND-COLOR: =
#a0ffff">document</STRONG>.write() &nb=
sp; =20
=
//=B6=AF=CC=AC=CF=F2=D2=B3=C3=E6=D0=B4=C8=EB=C4=DA=C8=DD<BR><STRONG=20
style=3D"COLOR: black; BACKGROUND-COLOR: =
#a0ffff">document</STRONG>.createElement(Tag) &nbs=
p; =20
//=B4=B4=BD=A8=D2=BB=B8=F6html=B1=EA=C7=A9=B6=D4=CF=F3<BR><STRONG=20
style=3D"COLOR: black; BACKGROUND-COLOR: =
#a0ffff">document</STRONG>.getElementById(ID) &nbs=
p; =20
//=BB=F1=B5=C3=D6=B8=B6=A8ID=D6=B5=B5=C4=B6=D4=CF=F3<BR><STRONG=20
style=3D"COLOR: black; BACKGROUND-COLOR: =
#a0ffff">document</STRONG>.getElementsByName(Name) =20
//=BB=F1=B5=C3=D6=B8=B6=A8Name=D6=B5=B5=C4=B6=D4=CF=F3<BR><STRONG=20
style=3D"COLOR: black; BACKGROUND-COLOR: =
#a0ffff">document</STRONG>.body.appendChild(oTag)<BR>--------------------=
-------------------------------------------------</P>
<P>body-=D6=F7=CC=E5=D7=D3=B6=D4=CF=F3<BR><STRONG=20
style=3D"COLOR: black; BACKGROUND-COLOR: =
#a0ffff">document</STRONG>.body =
=20
=
//=D6=B8=B6=A8=CE=C4=B5=B5=D6=F7=CC=E5=B5=C4=BF=AA=CA=BC=BA=CD=BD=E1=CA=F8=
=B5=C8=BC=DB=D3=DA<body></body><BR><STRONG=20
style=3D"COLOR: black; BACKGROUND-COLOR: =
#a0ffff">document</STRONG>.body.bgColor &nbs=
p; =20
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -