Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

»ñÈ¡Ô¶³ÌÍøÒ³htmlÔ´Âë

''' <summary>
''' »ñÈ¡ÍøÒ³htmlÔ´Âë¡£
''' </summary>
''' <param name="AUrl"></param>
''' <returns></returns>
''' <remarks></remarks>
Public Shared Function GetHtml(ByVal AUrl As String, ByVal APageCode As System.Text.Encoding) As String
Dim httpReq As System.Net.HttpWebRequest = Nothing
Dim httpResp As System.Net.HttpWebResponse = Nothing
Dim httpURL As New System.Uri(AUrl)
Dim reader As IO.StreamReader = Nothing
Dim htmlStr As String = String.Empty
Try
httpReq = CType(Net.WebRequest.Create(httpURL), Net.HttpWebRequest)
httpReq.Method = "GET"
httpResp = CType(httpReq.GetResponse(), Net.HttpWebResponse)
reader = New IO.StreamReader(httpResp.GetResponseStream, APageCode)
htmlStr = reader.ReadToEnd()
Catch ex As Exception
Finally
If Not IsNothing(reader) Then reader.Close()
If Not IsNothing(httpResp) Then httpResp.Close()
End Try
Return htmlStr
End Function


Ïà¹ØÎĵµ£º

²»Ó¦ºöÊÓµÄHTMLÓÅ»¯


×÷Õß




´Þ¿µ

·¢²¼ÓÚ
2010Äê5ÔÂ13ÈÕ ÏÂÎç10ʱ14·Ö









Ëæ×ÅWeb2.0¼¼ÊõµÄ²»¶Ï·¢Õ¹£¬WebÇ°¶ËµÄÓÅ»¯Êܵ½Ô½À´Ô½¶àµÄ¹Ø×¢£¬ÌرðÊÇJavaScriptºÍCSSÓÅ»¯µÄÌÖÂÛÒ»Ö±ÊÇÈȵ㣬¹¤¾ßÒ²
Ïà¶Ô·á¸»£¬¶ø¶ÔHTMLÓÅ»¯ÔòÓÐËùºöÊÓ£¬×î½ü£¬À´×԰ٶȷºÓû§Ìå ......

Ö§³Ö£¬´¿Îı¾£¬HTML£¬³¬Á´½Ó£¬¸½¼þµÄÈ«ÄÜÓʼþ·¢ËÍ×é¼þ

ÏÂÔصØÖ·£ºhttp://download.csdn.net/source/2381400
´ËΪÓʼþ·¢ËÍ¿ª·¢×é¼þ£¬ÄÚÓи÷Ö÷Á÷³ÌÐòÓïÑÔ´úÂëʾÀý£¬²¢¸½Éú³ÉµÄexe£¬Ê¾ÀýÉú³ÉµÄexeÒà¿Éµ¥¶À×÷Ϊ¶ÀÁ¢³ÌÐòʹÓá£
Ö§³Ö ´¿Îı¾£¬HTML£¬³¬Á´½Ó£¬¸½¼þ
ÄãÊDz»ÊÇһֱΪÁËVC·¢ËÍÓʼþ·¢³î°¡£¬ÓÐÁËËü£¬°×²ËÈ«ÄÜÓʼþ·¢ËÍ×é¼þ£¬Äã¾Í¿ÉÒÔÇáËɵÄÏñµ÷ÓÃwindows apiÄÇÑùÀ´ÊµÏÖ»òVC· ......

È¥³ýÍøÕ¾ÖÐHTML±êÇ©µÄÕýÔò±í´ïʽ

string str = a.ToString();
str = Regex.Replace(str, @"</?span[^>]*>", "", RegexOptions.IgnoreCase);
str = Regex.Replace(str, @"&#[^>]*;", "", RegexOptions.IgnoreCase);
str = Regex.Replace(str, @"</?marquee[^>]*>", "", RegexOptions.IgnoreCase);
str = Regex.Replace(str, ......

zz html DOM ÖÐ document ºÍwindowµÄÇø±ð

[window¶ÔÏó]
ËüÊÇÒ»¸ö¶¥²ã¶ÔÏó,¶ø²»ÊÇÁíÒ»¸ö¶ÔÏóµÄÊôÐÔ£¬¼´ä¯ÀÀÆ÷µÄ´°¿Ú¡£
ÊôÐÔ
defaultStatus ȱʡµÄ״̬ÌõÏûÏ¢
document µ±Ç°ÏÔʾµÄÎĵµ(¸ÃÊôÐÔ±¾ÉíÒ²ÊÇÒ»¸ö¶ÔÏó)
frame ´°¿ÚÀïµÄÒ»¸ö¿ò¼Ü((FRAME>)(¸ÃÊôÐÔ±¾ÉíÒ²ÊÇÒ»¸ö¶ÔÏó)
frames array Áоٴ°¿ÚµÄ¿ò¼Ü¶ÔÏóµÄÊý×é,°´ÕÕÕâЩ¶ÔÏóÔÚÎĵµÖгöÏÖµÄ˳ÐòÁгö(¸ ......

htmlÓïÑÔÖÐmeta±êÇ©Ó÷¨

META±êÇ©ÊÇ·ÅÓÚÍøÒ³Ô´ÎļþÖÐHEAD Óë /HEADÖ®¼äµÄ±ê¼Ç£¬ÆäÖ÷Òª¹¦ÄÜΪ£º
XML/HTML Code ¸´ÖÆÄÚÈݵ½¼ôÌù°å meta name = Description content = ÍøÒ³µÄÃèÊö ¸ÃÍøÒ³µÄÃèÊö£¬×÷ÓÃÓÚËÑË÷ÒýÇæµÄµÇ
<META>±êÇ©ÊÇ·ÅÓÚÍøÒ³Ô´ÎļþÖÐ<HEAD> Óë </HEAD>Ö®¼äµÄ±ê¼Ç£¬ÆäÖ÷Òª¹¦ÄÜΪ£º
<
meta
 
name
=
&q ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ