ASP.NET ÖÐÈçºÎ¶ÔÉú³ÉµÄ HTML ÄÚÈÝÁ÷½øÐпØÖÆ£¿
<%@ Page Language="C#" %>
<%@ Import Namespace="System.IO" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
protected override void Render(HtmlTextWriter writer)
{
string content = string.Empty;
StringWriter stringWriter = new StringWriter();
HtmlTextWriter htmlWriter = new HtmlTextWriter(stringWriter);
try
{
// ½«µ±Ç°Ò³ÃæµÄÄÚÈݳÊÏÖµ½ÁÙʱµÄ HtmlTextWriter ¶ÔÏóÖÐ
base.Render(htmlWriter);
htmlWriter.Close();
// µÃµ½µ±Ç°Ò³ÃæµÄÈ«²¿ÄÚÈÝ
content = stringWriter.ToString();
// Ìæ»»Ò³ÃæÖеIJ¿·ÖÄÚÈÝ
string newContent = content.Replace("[mxh]", "ÃÏÏÜ»á");
// ½«ÐÂÒ³ÃæµÄÄÚÈÝÏÔʾ³öÀ´
writer.Write(newContent);
}
catch { }
finally
{
stringWriter.Dispose();
htmlWriter.Close();
htmlWriter.Dispose();
}
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>ÃÏÏÜ»áÖ®Ìæ»»Ò³Ãæ³ÊÏÖÄÚÈݲâÊÔ</titl
Ïà¹ØÎĵµ£º
ÔÚ²»Í¬°æ±¾µÄ IIS ÉÏʹÓà ASP.NET MVC
ASP.NET MVC Framework ÒÀÀµÓÚ URL ·ÓÉ¡£ÎªÁËÀûÓà URL ·ÓÉ£¬¿ÉÄܲ»µÃ²»ÔÚ Web ·þÎñÆ÷ÉÏÖ´ÐжîÍâµÄÅäÖò½Öè¡£ÕâЩ²½ÖèÈ¡¾öÓÚ Internet Information Services (IIS) µÄ°æ±¾ºÍÓ¦ÓóÌÐòµÄÇëÇó´¦Àíģʽ¡£
IIS µÄ×îа汾ÊÇ°æ±¾ 7.0¡£IIS µÄ´Ë°æ±¾°üÀ¨ÔÚ Windows Server 2008 ÖС£»¹¿ÉÒÔ ......
import urllib
from HTMLParser import HTMLParser
class TitleParser(HTMLParser):
def __init__(self):
self.title = ''
self.divcontent = ''
self.readingtitle = 0
self.readingdiv = 0
HTMLParser.__init__(self)
def handle_starttag(self, tag, attrs):
......
HTMLÔÚÏß±à¼Æ÷²»ÐèÒª¶®µÃʹÓÃDreamweaver8£¬»áÓÃWord¾Í»áʹÓô˱à¼Æ÷£¬ÔÚÎÄÕÂϵͳ»òÕßÊÇÐÂÎÅϵͳÐèÒªÎÄ×ֱ༵Äweb³ÌÐòÖзdz£ÊµÓá£
¡¡¡¡µ«ÊÇÈçºÎ½«html±à¼Æ÷ǶÈëµ½webÒ³ÖкÍÔõôȡµÃÀïÃæµÄÊý¾ÝÄØ£¿£¡
¡¡¡¡Ê×ÏÈÎÒÃǼٶ¨ÎÒÃÇËùÒªµ÷ÓõÃHTMLÔÚÏß±à¼Æ÷·ÅÔÚÒ»¸öµ¥¶ÀµÃÒ³ÃæÖУ¬ÎļþÃûÊÇgledit.htm¡£
¡¡¡¡HTMLÔÚÏß±à¼Æ ......