È¥³ýHTML¸ñʽ ½ØÈ¡×Ö·û´®
//½ØÈ¡²¿·ÖÄÚÈÝ·½·¨
public static string strvalue(string value, int length)
{
string strValue = NoHTML(value);// È¥³ýHTML±ê¼Ç
if (strValue.Length > length)
{
return strValue.Substring(0, length) + "...";
}
else
{
return strValue;
}
}
#region »Ø³µ,¿Õ¸ñ¹ýÂË
/**/
/// <summary>
/// È¥³ýHTML±ê¼Ç
/// </summary>
/// <param name="NoHTML">°üÀ¨HTMLµÄÔ´Âë </param>
/// <returns>ÒѾȥ³ýºóµÄÎÄ×Ö</returns>
public static string NoHTML(string Htmlstring)
{
//ɾ³ý½Å±¾
Htmlstring = Regex.Replace(Htmlstring, @"<script[^>]*?>.*?</script>", "",
RegexOpti
Ïà¹ØÎĵµ£º
html ÍøÒ³ÃèÊöÓïÑÔ
htmlµÄ»ù±¾¿ò¼Ü
<head> //±êÇ©Í·
<javacript> &nb ......
ÀÏʦÁô×÷Òµ×ö¸ö¼òµ¥Í¼Ïñä¯ÀÀ¼Ó¸÷Öַת+͸Ã÷+ºÚ°×Á¬Ðø´¦ÀíµÄhtml,±¾ÒÔΪºÜÈÝÒ×,
ËÖªµÀһŪ²Å·¢ÏÖ»ðºü¸ß°æ±¾µÄinput file ºÍIeÖеIJ»Ò»Ñù
JSÖÐfileObj.value Ö»Äܵõ½ÎļþÃû...
¸ãµÃÄÔ´üÖ±´ó
»ðºü3ÒÔÉÏ°æ±¾ÓÐbug ÒòΪinput file ²»Ö§³Ö»ñÈ¡ÎļþÍêÕû·¾¶,±È½ÏÍ´¿à,½â¾ö²»ÁË,ËùÒÔ²»ÄÜ·¢urlµ½servletÖÐ,ÒÔÖÁÓÚÖ»ÄÜä¯ÀÀ
² ......
ÀýÈç´Ó1.htmlÌøתµ½2.html£º
ÔÚ1.htmlÖУº
¡¡¡¡<form name="loginForm" action="2.htm?pageid=1&str='s'" method="post">
µ±Ò³ÃæÌá½»Ìøתµ½2.htmlÖУº
<script type="text/javascript">
<!--
var str = location.search;
//-->
&l ......
<html:html>±êÇ©ÓÐÒ»¸ö lang ÊôÐÔ£¬ÓÃÓÚÏÔʾÓû§Ê¹ÓõÄÓïÑÔ£º
<html:html lang="true">
Èç¹û¿Í»§ä¯ÀÀÆ÷ʹÓÃÖÐÎÄ£¬ÄÇôÒÔÉÏ´úÂëÔÚÔËÐÐʱ½«±»½âÎöΪÆÕͨµÄ HTML ´úÂ룺
<html lang="zh-CN">
½âÊÍ£ºµ± lang ÊôÐÔΪ "true ......
<map name="Map4" id="Map4">
<area shape="rect" mce_shape="rect" coords="659,31,697,45" mce_coords="659,31,697,45" href="product/?keys=289" mce_href="product/?keys=289" />
</map>
<map name=" ......