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

È¥³ýÍøÕ¾ÖÐ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, @"</?object[^>]*>", "", RegexOptions.IgnoreCase);
str = Regex.Replace(str, @"</?param[^>]*>", "", RegexOptions.IgnoreCase);
str = Regex.Replace(str, @"</?embed[^>]*>","",RegexOptions.IgnoreCase);
str = Regex.Replace(str, @"</?table[^>]*>","",RegexOptions.IgnoreCase);
str = Regex.Replace(str, @" ","",RegexOptions.IgnoreCase);
str = Regex.Replace(str, @"</?tr[^>]*>", "", RegexOptions.IgnoreCase);
str = Regex.Replace(str, @"</?th[^>]*>","",RegexOptions.IgnoreCase);
str = Regex.Replace(str, @"</?p[^>]*>","",RegexOptions.IgnoreCase);
str = Regex.Replace(str, @"</?a[^>]*>","",RegexOptions.IgnoreCase);
str = Regex.Replace(str, @"</?img[^>]*>","",RegexOptions.IgnoreCase);
str = Regex.Replace(str, @"</?tbody[^>]*>","",RegexOptions.IgnoreCase);
str = Regex.Replace(str, @"</?li[^>]*>","",RegexOptions.IgnoreCase);
str = Regex.Replace(str, @"</?span[^>]*>","",RegexOptions.IgnoreCase);
str = Regex.Replace(str, @"</?div[^>]*>","",RegexOptions.IgnoreCase);
str = Regex.Replace(str, @"</?th[^>]*>", "", RegexOptions.IgnoreCase);
str = Regex.Replace(str, @"</?td[^>]*>", "", RegexOptions.IgnoreCase);
str = Regex.Replace(str, @"</?script[^>]*>", "", RegexOptions.IgnoreCase);
str = Regex.Replace(str, @"(javascript|jscript|vbscript|vbs):", "", RegexOptions.IgnoreCase);
str = Regex.Replace(str, @"on(mouse|exit|error|click|key)", "", RegexOptions.IgnoreCase);
str = Regex.Replace(str, @"<\\?xml[^>]*>", "", RegexOptions.IgnoreCase);
str = Regex.Replace(str, @"<\/?[a-z]+:[^>]*>", "", RegexOptions.Ignore


Ïà¹ØÎĵµ£º

html ³¬Á´½Ó a ÊôÐÔ

html ³¬Á´½Ó ÊôÐÔ
HTML ʹÓ󬼶Á´½ÓÓëÍøÂçÉϵÄÁíÒ»¸öÎĵµÏàÁ¬¡£
ê±êÇ©ºÍ Href ÊôÐÔ
HTML ʹÓà <a> £¨Ãª£©±êÇ©À´´´½¨Á¬½ÓÁíÒ»¸öÎĵµµÄÁ´½Ó¡£
ê¿ÉÒÔÖ¸ÏòÍøÂçÉϵÄÈκÎ×ÊÔ´£ºÒ»ÕÅ HTML Ò³Ãæ£¬Ò»·ùͼÏñ£¬Ò»¸öÉùÒô»òÊÓÆµÎļþµÈµÈ¡£
´´½¨ÃªµÄÓï·¨£º
<a href="url">Text to be displayed</a>
ÀýÈ磺
& ......

.net Éú³ÉHTMLÒ³


        protected override void OnPreInit(EventArgs e)
        {
            base.OnPreInit(e);
            string ......

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

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

ÏÂÀ­¿òÊ÷,HTML´úÂë

     ºÜ¶àʱºò£¬ÎÒÃÇÐèÒª½«ÏÂÀ­¿òÀïÃæµÄÊý¾ÝÓÃÊ÷ÏÔʾ³öÀ´£¬ÕâÑù»á±ãÓÚ¿Í»§µÃµ½ÇåÎúµÄÊý¾Ý£¬¶øÇұȽÏÖ±½Ó£¬ÁÀ³öÒÔÏÂHTML´úÂ룬¿ÉÒÔÖ±½Ó¸´ÖƵ½HTML´úÂëÀïÃæÔËÐУ¡
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-tran ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ