È¥³ý×Ö·û´®ÖеÄHtml´úÂë
/// <summary>
/// È¥µôËùÓÐHTML±êÇ©
/// </summary>
/// <param name="strHtml">Ô´×Ö·û´®</param>
/// <returns></returns>
public static string DropHTML(string strHtml)
{
return Regex.Replace(strHtml, "<[^>]*>", "");
}
Ïà¹ØÎĵµ£º
Ò»£®ÊôÐÔ£º
src£º¸ÃÊôÐÔÖ¸¶¨ÍⲿJavaScriptÎļþµÄµØÖ·£¬¿ÉÒÔ¿çÓò¡£Èç¹ûÖ¸¶¨Á˸ÃÊôÐÔ£¬ÄÇôscript±êÇ©ÖеÄÄÚÈݾͻᱻºöÂÔ¡£
type£ºÖ¸¶¨ËùʹÓõĽű¾ÓïÑÔ£¬¿ÉÒÔ¸²¸ÇĬÈϵĽű¾ÓïÑÔ£¨¼´ÔÚ<META http-equiv="Content-Script-Type" content="type">Öж¨ÒåµÄ½Å±¾ÀàÐÍ
£©¿ª·¢Õß±ØÐëÖ¸¶¨¸ÃÊôÐÔ£¬¸ÃÊôÐÔûÓÐĬÈÏÖµ¡ ......
HTMLÓÐ10¸ö±í¸ñÏà¹Ø±êÇ©¡£ÏÂÃæÊÇÒ»¸ö´øÓмò½éµÄÁÐ±í£¬µ«ÊÇÊ×ÏÈ£¬ÎĵµÒª±»ÕýÈ·µÄ¶¨ÒåÔÚHTML 4.01/XHTML 1»òHTML 5ÏÂÃæ:
<caption> ¶¨Òå±í¸ñ±êÌâ(4, 5)
<col> Ϊ±í¸ñµÄÁж¨ÒåÊôÐÔ(4, 5)
<colgroup> ¶¨Òå±í¸ñÁеķÖ×é(4, 5)
<table> ¶¨Òå±í¸ñ(4, 5)
<tbody> ¶¨Òå±í¸ñÖ÷Ìå(4, 5)
< ......
flexǶÈëµ½html£º
ÓÃswfobject,ÏÂÔصÄ.jsµØÖ·£ºhttp://www.adobe.com/devnet/activecontent/articles/devletter.html
ÔÚÄãµÄ HTML Ò³ÃæÍ·²¿<head>ÇøǶÈëÕâ¸ö½Å±¾Îļþ£º<script type="text/javascript" src="swfobject.js"></script>
ÔÚÄãµÄ HTML ÖÐдһ¸öÓÃÀ´·Å Flash µÄÈÝÆ÷£¬±ÈÈç<div> ......
³£ÓÃÕýÔò±í´ïʽ´óÈ«£¡£¨ÀýÈ磺ƥÅäÖÐÎÄ¡¢Æ¥Åähtml£©
Æ¥ÅäÖÐÎÄ×Ö·ûµÄÕýÔò±í´ïʽ£º [u4e00-u9fa5]
¡¡¡¡ÆÀ×¢£ºÆ¥ÅäÖÐÎÄ»¹ÕæÊǸöÍ·ÌÛµÄÊ£¬ÓÐÁËÕâ¸ö±í´ïʽ¾ÍºÃ°ìÁË
¡¡¡¡Æ¥ÅäË«×Ö½Ú×Ö·û(°üÀ¨ºº×ÖÔÚÄÚ)£º[^x00-xff]
¡¡¡¡ÆÀ×¢£º¿ÉÒÔÓÃÀ´¼ÆËã×Ö·û´®µÄ³¤¶È£¨Ò»¸öË«×Ö½Ú×Ö·û³¤¶È¼Æ2£¬ASCII×Ö·û¼Æ1£©
¡¡¡¡Æ ......
string tent = this.TextBox_info.Text.Replace("<", "<").Replace(">", ">").Replace(" ", " ").Trim().Replace("\n", "<br/>");
& ......