È¥³ý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
Ïà¹ØÎĵµ£º
struts html:link±êÇ©µÄÓ÷¨£¨×ª£©
¹ØÓÚ<html:link>±êÇ©ÔÚURIºóÃæ´«²ÎÊýµÄÎÊÌâ
ÔÚstruts±êÇ©<html:link>µÄpageÊôÐÔÖ¸¶¨µÄURIºóÃæ´«µÝ²ÎÊý¿ÉÒÔÓм¸ÖÖ·½Ê½£º
1.ÈôÃ÷È·²ÎÊýÃûºÍ²ÎÊýÖµÔòÖ±½ÓÔÚURIºóÊä³ö£¬
È磺<html:link page="/test.do?action=add">add</html:link>
2.¶ÔÓÚ²ÎÊýÖµ²»È·¶¨µÄ£¬p ......
Ê×ÏÈдһ¸öÒ³Ãæ£¬ÉÏÃæÒª·ÅÒ»¸öButton
<html>
<head>
<title></title>
</head>
<body>
<input id="Button1" type="button" value="button" />
</body>
</html>
½«Æä±£´ ......
ģ̬¶Ô»°¿òµã»÷Á´½Ó²»´ò¿ªÐ´°¿Ú
·½·¨1£º
ÔÚģ̬´°¿ÚÒ³ÃæÀï¼ÓÉÏ£º
<head>
<base target=_self >
</head>
''<base target=_self > ''·Åµ½<head>±êÇ©ÄÚ
·½· ......
ÓÐÊ±Ò³ÃæÐèÒª»ñµÃÓû§ä¯ÀÀÆ÷µÄ¸ß¶È²ÅÄÜÈ·¶¨ÄÚÈÝÏÔʾÔÚÄÄÀ´úÂë
<div style="position:absolute; left:0; top:expression(document.body.clientHeight/2-document.body.clientHeight/4)">
</div>
ÖУ¬expression(document.body.clientHeight/2)¼´Îª»ñµÃä¯ÀÀÆ÷¸ß¶ÈÔÙ³ýÒÔ2 ......
<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=" ......