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

ÔõôÑùÈ¥³ý×Ö·û´®ÄÚµÄ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³ÌÐòÔ±ÇóÖ° - .NET¼¼Êõ / ·Ç¼¼ÊõÇø

±¾È˹¤×÷¾­ÑéÒ»ÄêÒÔÉÏ
ÊìϤasp.net
ÊìϤjavascript
ÊìϤCss
ÊìϤajax
ÊìϤsqlserver2005
ÓÐÒ»ÄêµÄÏîÄ¿¾­Ñé
¾ßÌåÏîÄ¿ºÍÆäËûµÄ¾Í²»ÔÚÕâдÁË
ÓÐÒâÕßÁªÏµ£º
QQ:359233910
ÒýÓÃ
±¾È˹¤×÷¾­ÑéÒ»ÄêÒÔÉÏ
ÊìϤasp ......

ÇóÖú£ºÕÒASP.NETÍøÒ³ÖÆ×÷¸ßÊÖ£¬Óб¨³ê¡£

±¾ÈËÊDzËÄñÒ»¸ö£¬Æ½Ê±Òª×öÉúÒ⣬µ«ÊÇÕÒÁ˺ܶàÈË×öÍøÕ¾£¬¾ù±»Æ­ÁË¡£×öµÃ²»Èý²»ËÄ£¬ÏÖÔÚ¾öÐÄ×Ô¼ºÀ´×öÒ»¸ö£¬ÒÑѧϰASP.NETÏà¹ØµÄÍøÒ³ÖÆ×÷֪ʶ£¬ÓÐDW»ù´¡£¬¿ÉÒÔ˵ÊÇÄ¿Ç°Ö»ÓÐÀíÂÛ֪ʶ£¬µ«ÊÇÔÚʵ¼Ê¾ßÌå²Ù×÷µÄʱºò£¬×ÜÊÇÓöµ ......

asp.net Ò³ÃæÏÞʱÌá½» ÈçºÎʵÏÖ - .NET¼¼Êõ / ASP.NET

1.asp.net×öµÄÒ»¸ö´ðÌâÒ³Ã棬ÈçºÎʵʱÏÞʱºó×Ô¶¯Ìá½»£¬Çë´ó¼Ò¸øµã˼·
ÏÞʱµÄʱ¼äÐÅÏ¢´æ·ÅÔÚÊý¾Ý¿âÖÐ
2.Èç¹û´ðÌâʱ¼äÉèÖõĽϳ¤£¬ÈçºÎ·½Ê½session³¬Ê±ºóÒ³ÃæÎÞЧ
лл
ÓÃjs·½·¨À´¿ØÖÆ
»Ø¸´ÄÚÈÝÌ«¶ÌÁË¡£¡£

js ......

wapÍøÕ¾¿ª·¢µÄÎÊÌâ - .NET¼¼Êõ / ASP.NET

ÎÒÓÃ.net¿ª·¢wapÍøÕ¾
1£¬ÎÒ´Ó¹¤¾ßÏäÀïÍÏÁËÁ½¸ölink£¬ÕâÁ½¸ölink»áÏÔʾÔÚÁ½ÐУ¬Èç¹ûÈÃÕâÁ½¸ölink´¦ÓÚͬһÐС£
2£¬ÈçºÎÏÔʾÁ½¸ö¿Ø¼þÖ®¼äµÄ¿Õ¸ñÎÊÌâ¡£
¸úwapÓйØÂ𣿲»Ì«Ã÷°×

ÓÑÇé°ï¶¥¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£

¾Í ......

·¢±íÆÀÂÛʱ¹ýÂËHTML±ê¼Ç - Web ¿ª·¢ / JavaScript

ÔÚ·¢±íÆÀÂÛʱ ¹ýÂË ÈçºÎ£º<br/> <hr/> Ë«ÒýºÅ µ¥ÒýºÅ »¹ÓÐÆäËû µÈ Óкõķ½·¨¸æËßһϠлл
.replace(/<\w+[^>]*>/g,"").replace(/'/g,"''")
½«µ¥ÒýºÅ»»³É2¸ö ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ