ÔõôÑùÈ¥³ý×Ö·û´®ÄÚµÄHTML±êÇ© - .NET¼¼Êõ / ASP.NET
ÀýÈ磺string s="<dfdsfdsfsdf>dlfjdsfdsliA<dfd>Dfds<>CsA<dfdsfdsfdsf>";
È¥³ýµôºó£¬±ä³É s="dlfjdsfdsliADfdsCsA";
СµÜ°ÝлÁË~
s = Regex.Replace(s, @"<(.[^>]*)>", "", RegexOptions.IgnoreCase);
<script language="javascript">
var str = "<a href=\"\" target=\"_blank\">yes</a>"
alert(str.replace(/<(.|\n)+?>/gi, ""));
</script>
ÕýÔò±í´ïʽ£¬Â¥ÉϵÄÒѾд³öÀ´ÁË
..
ÓÐûÔÚºǫ́´¦ÀíµÄ°¡£¿
Regex reg = new Regex(@"<(.[^>]*)>");
string result = reg.Replace("", "");
Regex.Replace("", @"<[^>]*>", "");
¿´ÕÐ
/// <summary>
/// È¥µôhtml±ê¼Ç.µÃµ½ËüµÄÖµ
/// </summary>
/// <param name="text">Òª²Ù×÷µÄhtml´úÂë</param>
/// <returns></returns>
public static string GetText(string text)
{
string txt = string.Empty;
string pattern = "<[^>]+>";
Regex r = new Regex(pattern, RegexOptions.Compiled);
txt = r.Replace(text
Ïà¹ØÎÊ´ð£º
±¾È˹¤×÷¾ÑéÒ»ÄêÒÔÉÏ
ÊìϤasp.net
ÊìϤjavascript
ÊìϤCss
ÊìϤajax
ÊìϤsqlserver2005
ÓÐÒ»ÄêµÄÏîÄ¿¾Ñé
¾ßÌåÏîÄ¿ºÍÆäËûµÄ¾Í²»ÔÚÕâдÁË
ÓÐÒâÕßÁªÏµ£º
QQ:359233910
ÒýÓÃ
±¾È˹¤×÷¾ÑéÒ»ÄêÒÔÉÏ
ÊìϤasp ......
±¾ÈËÊDzËÄñÒ»¸ö£¬Æ½Ê±Òª×öÉúÒ⣬µ«ÊÇÕÒÁ˺ܶàÈË×öÍøÕ¾£¬¾ù±»ÆÁË¡£×öµÃ²»Èý²»ËÄ£¬ÏÖÔÚ¾öÐÄ×Ô¼ºÀ´×öÒ»¸ö£¬ÒÑѧϰASP.NETÏà¹ØµÄÍøÒ³ÖÆ×÷֪ʶ£¬ÓÐDW»ù´¡£¬¿ÉÒÔ˵ÊÇÄ¿Ç°Ö»ÓÐÀíÂÛ֪ʶ£¬µ«ÊÇÔÚʵ¼Ê¾ßÌå²Ù×÷µÄʱºò£¬×ÜÊÇÓöµ ......
1.asp.net×öµÄÒ»¸ö´ðÌâÒ³Ã棬ÈçºÎʵʱÏÞʱºó×Ô¶¯Ìá½»£¬Çë´ó¼Ò¸øµã˼·
ÏÞʱµÄʱ¼äÐÅÏ¢´æ·ÅÔÚÊý¾Ý¿âÖÐ
2.Èç¹û´ðÌâʱ¼äÉèÖõĽϳ¤£¬ÈçºÎ·½Ê½session³¬Ê±ºóÒ³ÃæÎÞЧ
лл
ÓÃjs·½·¨À´¿ØÖÆ
»Ø¸´ÄÚÈÝÌ«¶ÌÁË¡£¡£
js ......
ÎÒÓÃ.net¿ª·¢wapÍøÕ¾
1£¬ÎÒ´Ó¹¤¾ßÏäÀïÍÏÁËÁ½¸ölink£¬ÕâÁ½¸ölink»áÏÔʾÔÚÁ½ÐУ¬Èç¹ûÈÃÕâÁ½¸ölink´¦ÓÚͬһÐС£
2£¬ÈçºÎÏÔʾÁ½¸ö¿Ø¼þÖ®¼äµÄ¿Õ¸ñÎÊÌâ¡£
¸úwapÓйØÂ𣿲»Ì«Ã÷°×
ÓÑÇé°ï¶¥¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£
¾Í ......
ÔÚ·¢±íÆÀÂÛʱ ¹ýÂË ÈçºÎ£º<br/> <hr/> Ë«ÒýºÅ µ¥ÒýºÅ »¹ÓÐÆäËû µÈ Óкõķ½·¨¸æËßһϠлл
.replace(/<\w+[^>]*>/g,"").replace(/'/g,"''")
½«µ¥ÒýºÅ»»³É2¸ö ......