×÷Õߣº¹â½ÅѾ˼¿¼ ʱ¼ä£º12/23/2009 1:51:00 PM
Ò»¿ªÊ¼¾Í¾õµÃHTML±à¼Æ÷ÕâÍæÒâÓ¦¸ÃÊǺܸßÉîĪ²âµÄ¡£ËæËæ±ã±ã¾ÍÏëÕûÒ»¸öÓ¦¸Ã²»ÊÇÒ»¼þÈÝÒ×µÄÊÂÇé¡£ºóÀ´¶ÔWebBrowser¿Ø¼þÓÐÁËһЩÁ˽⣬²»¹ý¶¼ÊǺܷôdzµÄÁ˽⡣ֻ֪µÀÓÃÕâ¸ö¿Ø¼þ¾ÍÄܹ»ÔÚ×Ô¼ºµÄ³ÌÐòÖиãÒ»¸öWEBä¯ÀÀÆ÷Ö®ÀàµÄ¶«Î÷£¬´ÓÀ´Ã»ÓÐÏë¹ýHTML±à¼Æ÷Ò²¿ÉÒÔʹÓÃÕâ¸ö¿Ø¼þÀ´ÊµÏÖ¡£Ò²¾ÍÊÇ˵Õâ¸öWebBrowser¿Ø¼þ²»½ö½öÄܹ»ÓÃÀ´ÏÔʾHTMLÎĵµ£¬¶øÇÒÒ²¿ÉÒÔÓÃÀ´±à¼HTMLÎĵµ¡£µ±È»ÁË£¬ÕâЩ¹¦ÄÜ΢ÈíÒѾ¶¼Ìṩ¸øÎÒÃÇÁË¡£ËùÐèÒª×öµÄ¾ÍÊÇ°´ÕÕÄǸö¹æÔòÈ¥±àд×Ô¼ºµÄ´úÂëÁË¡£ÎÒÏëHTML±à¼Æ÷µÄʵÏÖ·½Ê½²»Ó¦¸ÃÖ»ÓÐÕâÒ»ÖÖ£¬Ö»ÊÇÔÛ²»»á¾ÍÊÇÁË£¡^_^
ÏÈÀ´¿´¿´ÎÒ×Ô¼ºÊµÏÖµÄÕâ¸öСÈí¼þ£¬½çÃæÈçÏÂͼ£º
³¬¼¶¼òµ¥µÄСÈí¼þ°É£¡
ÄǸö¡¾ÎÄ×ÖÏÂÀÁÐ±í¡¿ÊÇÓÃÀ´ÐÞ¸Ä×ÖÌåµÄ£¬¡¾¼Ó´Ö¡¿°´Å¥ÊÇÓÃÀ´½«×ÖÌå¼Ó´Ö£¬»òÕßÈÃÆä¼õ·ÊµÄ£¬¡¾Ï»®Ïß¡¿°´Å¥ÔòÊÇΪѡÖеÄÎÄ×Ö¼Ó¼õÏ»®Ïߵġ£×îºóÄǸö¡¾ÏÔʾԴÂë¡¿°´Å¥Ö÷ÒªÊÇΪÁË¿´¿´ÐÞ¸Ä֮ǰºÍÐÞ¸ÄÖ®ºóµÄHTMLÔ´Â붼×öÁËÄÇЩ¸Ä±ä¡£ÆäËû¾ÍûʲôÁË¡£
Ï·½µÄÄÇ¿é´óµÄ¿Õ°×ÇøÓò£¬¾ÍÊÇWebBrowser¿Ø¼þÁË£¬¼ÈÊÇÓÃÀ´ÏÔʾHTMLÎĵµ£¬Ò²ÊÇÓÃÀ´±à¼HTMLÎĵµµÄ£¬ÔÚÕâÀïÖ»ÓÃ×÷±à¼Æ÷¡£
½Ó×ÅÀ´¿´Ô´´úÂë°É¡¡
ĬÈÏÇé¿öÏ£¬WebBrowser²¢Ã»Óд ......
×÷Õߣº¹â½ÅѾ˼¿¼ ʱ¼ä£º12/23/2009 1:51:00 PM
Ò»¿ªÊ¼¾Í¾õµÃHTML±à¼Æ÷ÕâÍæÒâÓ¦¸ÃÊǺܸßÉîĪ²âµÄ¡£ËæËæ±ã±ã¾ÍÏëÕûÒ»¸öÓ¦¸Ã²»ÊÇÒ»¼þÈÝÒ×µÄÊÂÇé¡£ºóÀ´¶ÔWebBrowser¿Ø¼þÓÐÁËһЩÁ˽⣬²»¹ý¶¼ÊǺܷôdzµÄÁ˽⡣ֻ֪µÀÓÃÕâ¸ö¿Ø¼þ¾ÍÄܹ»ÔÚ×Ô¼ºµÄ³ÌÐòÖиãÒ»¸öWEBä¯ÀÀÆ÷Ö®ÀàµÄ¶«Î÷£¬´ÓÀ´Ã»ÓÐÏë¹ýHTML±à¼Æ÷Ò²¿ÉÒÔʹÓÃÕâ¸ö¿Ø¼þÀ´ÊµÏÖ¡£Ò²¾ÍÊÇ˵Õâ¸öWebBrowser¿Ø¼þ²»½ö½öÄܹ»ÓÃÀ´ÏÔʾHTMLÎĵµ£¬¶øÇÒÒ²¿ÉÒÔÓÃÀ´±à¼HTMLÎĵµ¡£µ±È»ÁË£¬ÕâЩ¹¦ÄÜ΢ÈíÒѾ¶¼Ìṩ¸øÎÒÃÇÁË¡£ËùÐèÒª×öµÄ¾ÍÊÇ°´ÕÕÄǸö¹æÔòÈ¥±àд×Ô¼ºµÄ´úÂëÁË¡£ÎÒÏëHTML±à¼Æ÷µÄʵÏÖ·½Ê½²»Ó¦¸ÃÖ»ÓÐÕâÒ»ÖÖ£¬Ö»ÊÇÔÛ²»»á¾ÍÊÇÁË£¡^_^
ÏÈÀ´¿´¿´ÎÒ×Ô¼ºÊµÏÖµÄÕâ¸öСÈí¼þ£¬½çÃæÈçÏÂͼ£º
³¬¼¶¼òµ¥µÄСÈí¼þ°É£¡
ÄǸö¡¾ÎÄ×ÖÏÂÀÁÐ±í¡¿ÊÇÓÃÀ´ÐÞ¸Ä×ÖÌåµÄ£¬¡¾¼Ó´Ö¡¿°´Å¥ÊÇÓÃÀ´½«×ÖÌå¼Ó´Ö£¬»òÕßÈÃÆä¼õ·ÊµÄ£¬¡¾Ï»®Ïß¡¿°´Å¥ÔòÊÇΪѡÖеÄÎÄ×Ö¼Ó¼õÏ»®Ïߵġ£×îºóÄǸö¡¾ÏÔʾԴÂë¡¿°´Å¥Ö÷ÒªÊÇΪÁË¿´¿´ÐÞ¸Ä֮ǰºÍÐÞ¸ÄÖ®ºóµÄHTMLÔ´Â붼×öÁËÄÇЩ¸Ä±ä¡£ÆäËû¾ÍûʲôÁË¡£
Ï·½µÄÄÇ¿é´óµÄ¿Õ°×ÇøÓò£¬¾ÍÊÇWebBrowser¿Ø¼þÁË£¬¼ÈÊÇÓÃÀ´ÏÔʾHTMLÎĵµ£¬Ò²ÊÇÓÃÀ´±à¼HTMLÎĵµµÄ£¬ÔÚÕâÀïÖ»ÓÃ×÷±à¼Æ÷¡£
½Ó×ÅÀ´¿´Ô´´úÂë°É¡¡
ĬÈÏÇé¿öÏ£¬WebBrowser²¢Ã»Óд ......
<html>
<script language="javascript" defer>
function isvalid()
{
Input_Str=document.getElementById("tsinput").value;
document.getElementById("ts").innerHTML=Input_Str;
if(Input_Str!=document.getElementById("ts").innerText)
alert("include Html Element.....");
}
</script>
<body>
<span id="ts" style="visibility:hidden;position:absolute" width=0 height=0></span>
<input type="text" value="" id="tsinput">
<input type="button" value=" " id="tsinput" onclick="isvalid()">
</body>
</html> ......
×ÖÌå(FONT)±ê¼Ç(TAGS)
±êÌâ×ÖÌå(Header)
<h#> ... </h#> #=1, 2, 3, 4, 5, 6
<h1>½ñÌìÌìÆøÕæºÃ£¡</h1> ½ñÌìÌìÆøÕæºÃ£¡
<h2>½ñÌìÌìÆøÕæºÃ£¡</h2> ½ñÌìÌìÆøÕæºÃ£¡
<h3>½ñÌìÌìÆøÕæºÃ£¡</h3> ½ñÌìÌìÆøÕæºÃ£¡
<h4>½ñÌìÌìÆøÕæºÃ£¡</h4> ½ñÌìÌìÆøÕæºÃ£¡
<h5>½ñÌìÌìÆøÕæºÃ£¡</h5> ½ñÌìÌìÆøÕæºÃ£¡
<h6>½ñÌìÌìÆøÕæºÃ£¡</h6> ½ñÌìÌìÆøÕæºÃ£¡
<hn>---</hn> ÕâЩ±ê¼ÇÏÔʾºÚÌå×Ö¡£
<hn>---</hn> ÕâЩ±ê¼Ç×Ô¶¯²åÈëÒ»¸ö¿ÕÐУ¬²»±ØÓà <p> ±ê¼ÇÔÙ¼Ó¿ÕÐС£
Òò´ËÔÚÒ»ÐÐÖÐÎÞ·¨Ê¹Óò»Í¬´óСµÄ×ÖÌå¡£
×ÖÌå´óС
<font size=#> ... </font> #=1, 2, 3, 4, 5, 6, 7 or +#, -#
<basefont size=#> #=1, 2, 3, 4, 5, 6, 7
<font size=7>½ñÌìÌìÆøÕæºÃ£¡</font> ½ñÌìÌìÆøÕæºÃ£¡
<font size=6>½ñÌìÌìÆøÕæºÃ£¡</font> ½ñÌìÌìÆøÕæºÃ£¡
<font size=5>½ñÌìÌìÆøÕæºÃ£¡</font> ½ñÌìÌìÆøÕæºÃ£¡
<font size=4>½ñÌìÌìÆøÕæºÃ£¡</font> ½ñÌìÌìÆøÕæºÃ£¡
<font size=3>½ñÌìÌìÆøÕæºÃ£¡</font> ......
Document ¶ÔÏó
Document ¶ÔÏó´ú±íÕû¸ö HTML Îĵµ£¬¿ÉÓÃÀ´·ÃÎÊÒ³ÃæÖеÄËùÓÐÔªËØ¡£
Document ¶ÔÏóÊÇ Window ¶ÔÏóµÄÒ»¸ö²¿·Ö£¬¿Éͨ¹ý window.document ÊôÐÔÀ´·ÃÎÊ¡£
ÓÐ¹Ø Document ¶ÔÏóµÄÏêϸÃèÊö¡£
IE: Internet Explorer, F: Firefox, O: Opera, W3C: World Wide Web Consortium (Internet ±ê×¼).
Document ¶ÔÏóµÄ¼¯ºÏ
¼¯ºÏÃèÊöIEFOW3C
all[]
Ìṩ¶ÔÎĵµÖÐËùÓÐ HTML ÔªËصķÃÎÊ¡£
4
1
9
Yes
anchors[]
·µ»Ø¶ÔÎĵµÖÐËùÓÐ Anchor ¶ÔÏóµÄÒýÓá£
4
1
9
Yes
applets
·µ»Ø¶ÔÎĵµÖÐËùÓÐ Applet ¶ÔÏóµÄÒýÓá£
-
-
-
-
forms[]
·µ»Ø¶ÔÎĵµÖÐËùÓÐ Form ¶ÔÏóÒýÓá£
4
1
9
Yes
images[]
·µ»Ø¶ÔÎĵµÖÐËùÓÐ Image ¶ÔÏóÒýÓá£
4
1
9
Yes
links[]
·µ»Ø¶ÔÎĵµÖÐËùÓÐ Area ºÍ Link ¶ÔÏóÒýÓá£
4
1
9
Yes
Document ¶ÔÏóµÄÊôÐÔ
ÊôÐÔÃèÊöIEFOW3C
body
Ìṩ¶Ô <body> ÔªËصÄÖ±½Ó·ÃÎÊ¡£¶ÔÓÚ¶¨ÒåÁË¿ò¼Ü¼¯µÄÎĵµ£¬¸ÃÊôÐÔÒýÓÃ×îÍâ²ãµÄ <frameset>¡£
cookie
ÉèÖûò·µ»ØÓ뵱ǰÎĵµÓйصÄËùÓÐ cookie¡£
4
1
9
Yes
domain
·µ»Øµ±Ç°ÎĵµµÄÓòÃû¡£
4
1
9
Yes
lastModified
·µ»ØÎĵµ±»×îºóÐ޸ĵÄÈÕÆÚ ......
Window ¶ÔÏó
Window ¶ÔÏóÊÇ JavaScript ²ã¼¶ÖеĶ¥²ã¶ÔÏó¡£
Window ¶ÔÏó´ú±íÒ»¸öä¯ÀÀÆ÷´°¿Ú»òÒ»¸ö¿ò¼Ü¡£
Window ¶ÔÏó»áÔÚ <body> »ò <frameset> ÿ´Î³öÏÖʱ±»×Ô¶¯´´½¨¡£
ÓÐ¹Ø Window ¶ÔÏóµÄÏêϸÃèÊö¡£
IE: Internet Explorer, F: Firefox, O: Opera.
Window ¶ÔÏóµÄ¼¯ºÏ
CollectionDescriptionIEFO
frames[]
·µ»Ø´°¿ÚÖÐËùÓÐÃüÃûµÄ¿ò¼Ü¡£¸Ã¼¯ºÏÊÇ Window ¶ÔÏóµÄÊý×飬ÿ¸ö Window ¶ÔÏóÔÚ´°¿ÚÖк¬ÓÐÒ»¸ö¿ò¼Ü»ò <iframe>¡£ÊôÐÔ frames.length ´æ·ÅÊý×é frames[] Öк¬ÓеÄÔªËظöÊý¡£×¢Ò⣬frames[] Êý×éÖÐÒýÓõĿò¼Ü¿ÉÄÜ»¹°üÀ¨¿ò¼Ü£¬ËüÃÇ×Ô¼ºÒ²¾ßÓÐ frames[] Êý×é¡£
4
1
9
Window ¶ÔÏóµÄÊôÐÔ
ÊôÐÔÃèÊöIEFO
closed
·µ»Ø´°¿ÚÊÇ·ñÒѱ»¹Ø±Õ¡£
4
1
9
defaultStatus
ÉèÖûò·µ»Ø´°¿Ú״̬À¸ÖеÄĬÈÏÎı¾¡£
4
No
9
document
¶Ô Document ¶ÔÏóµÄÖ»¶ÁÒýÓá£Çë²ÎÔÄ Document ¶ÔÏó¡£
4
1
9
history
¶Ô History ¶ÔÏóµÄÖ»¶ÁÒýÓá£Çë²ÎÊý History ¶ÔÏó¡£
4
1
9
innerheight
·µ»Ø´°¿ÚµÄÎĵµÏÔʾÇøµÄ¸ß¶È¡£
No
No
No
innerwidth
·µ»Ø´°¿ÚµÄÎĵµÏÔʾÇøµÄ¿í¶È¡£
No
No
No
length
ÉèÖûò·µ»Ø´°¿ÚÖеĿò¼ÜÊýÁ¿¡£
4
1
9
location
......
HTML³£Ó÷ûºÅ£º
ÏÔʾһ¸ö¿Õ¸ñ  
< СÓÚ < <
> ´óÓÚ > >
& &·ûºÅ & &
" Ë«ÒýºÅ " "
ÆäËû³£ÓõÄ×Ö·ûʵÌå(Character Entities)
ÏÔʾ½á¹û ˵Ã÷ Entity Name Entity Number
? °æȨ © ©
? ×¢²áÉÌ±ê ® ®
× ³ËºÅ × ×
÷ ³ýºÅ ÷ ÷
ISO Latin-1×Ö·û¼¯:
×Ö·û Ê®½øÖÆ×Ö·û±àºÅ ʵÌåÃû×Ö ËµÃ÷
--- 	 --- ÖƱí·ûHorizontal tab
--- --- »»ÐÐLine feed
--- --- »Ø³µCarriage Return
  --- Space
! ! --- ¾ªÌ¾ºÅExclamation mark
" " " Ë«ÒýºÅQuotation mark
# # --- Êý×Ö±êÖ¾Number sign
$ $ --- ÃÀÔª±êÖ¾Dollar sign
% % --- °Ù·ÖºÅPercent sign
& & & Ampersand
" ' --- µ¥ÒýºÅApostrophe
( ( --- СÀ¨ºÅ×ó±ß²¿·ÖLeft parenthesis
) ) --- СÀ¨ºÅÓұ߲¿·ÖRight parenthesis
* * --- ÐǺÅAsterisk
+ + --- ¼Óº ......