Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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 5 ½Ì³Ì(Ò») ǰÑÔ

       ³¬Îı¾±ê¼ÇÓïÑÔ£¨HTML£©5 µÚÒ»´ÎÏò HTML ÖÐÒýÈëеÄÔªËØ¡£ÐÂµÄ½á¹¹ÔªËØ°üÀ¨ aside¡¢figure ºÍ section¡£ÐµÄÄÚÁªÔªËذüÀ¨ time¡¢meter ºÍ progress¡£ÐµÄÄÚÇ¶ÔªËØÓÐ video ºÍ audio¡£ÐµĽ»»¥ÔªËØÓÐ details¡¢datagrid ºÍ command¡£  
¡¡¡¡³¬Îı¾±ê¼ÇÓïÑÔ£¨HTML£©µÄ¿ª·¢µ½ ......

È¥³ýÍøÕ¾ÖÐ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, ......

jspÉú³Éhtml¾²Ì¬Ò³Ãæ´úÂë

<%@ page contentType="text/html;charset=GBK"%>
<%@page import="java.util.*"%>
<%@page import="java.io.*" %>
<%
//ÔÚÕâÀïÈç¹ûд³É“WEB-INF\templates\template.htm”³ÌÐò»á±¨´í
 String filePath = request.getRealPath("/")+"WEB-INF/templates/template.htm"; &nbs ......

¼òÊöHTML¿Ø¼þÓëWeb·þÎñÆ÷¿Ø¼þµÄÇø±ð

WEB·þÎñÆ÷¿Ø¼þÊÇHTML¿Ø¼þµÄÒ»ÖÖÀ©Õ¹,Çø±ðÊÇ:
1)ǰÕß¿ÉÒÔ´¥·¢·þÎñÆ÷¿Ø¼þÌØÓеÄʼþ£¬ºóÕßÖ»ÄÜͨ¹ý»ØµÝµÄ·½Ê½´¥·¢·þÎñÆ÷ÉϵÄÒ³Ãæ¼¶Ê¼þ¡£
2)ÊäÈ뵽ǰÕßÖеÄÊý¾ÝÔÚÇëÇóÖ®¼ä¿ÉÒÔά»¤£¨¼´¾ßÓÐ״̬¹ÜÀí¹¦ÄÜ£©,¶øºóÕßÎÞ·¨×Ô¶¯Î¬»¤Êý¾Ý£¬Ö»ÄÜʹÓÃÒ³Ãæ¼¶µÄ½Å±¾À´±£´æºÍ»Ö¸´¡£
3)ǰÕß¿ÉÒÔ×Ô¶¯¼ì²âä¯ÀÀÆ÷²¢µ÷Õûµ½Ç¡µ±µÄÏÔʾ£¬¶øº ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ