È¥³ý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 ......
¾²Ì¬½á¹¹
£¼html£¾
£¼head£¾
£¼title£¾±êÌ⣼title£¾
£¼/head£¾
£¼body£¾..........ÎļþÄÚÈÝ..........
£¼/body£¾
£¼/html£¾
1.Îļþ±êÌâ
£¼title£¾..........£¼/title£¾
2.Îļþ¸üÐÂ--£¼meta£¾
¡¡¡¾1¡¿10Ãëºó×Ô¶¯¸üÐÂÒ»´Î
¡¡¡¡£¼meta http-equiv="refresh" content=10£¾
¡¡¡¾2¡¿10Ãëáá×Ô¶¯Á¬½áµ½ÁíÒ»Îļþ
¡¡¡¡ ......
ÀÏʦÁô×÷Òµ×ö¸ö¼òµ¥Í¼Ïñä¯ÀÀ¼Ó¸÷Öַת+͸Ã÷+ºÚ°×Á¬Ðø´¦ÀíµÄhtml,±¾ÒÔΪºÜÈÝÒ×,
ËÖªµÀһ۲ŷ¢ÏÖ»ðºü¸ß°æ±¾µÄinput file ºÍIeÖеIJ»Ò»Ñù
JSÖÐfileObj.value Ö»Äܵõ½ÎļþÃû...
¸ãµÃÄÔ´üÖ±´ó
»ðºü3ÒÔÉϰ汾ÓÐbug ÒòΪinput file ²»Ö§³Ö»ñÈ¡ÎļþÍêÕû·¾¶,±È½ÏÍ´¿à,½â¾ö²»ÁË,ËùÒÔ²»ÄÜ·¢urlµ½servletÖÐ,ÒÔÖÁÓÚÖ»ÄÜä¯ÀÀ
² ......
Ê×ÏÈдһ¸öÒ³Ãæ£¬ÉÏÃæÒª·ÅÒ»¸öButton
<html>
<head>
<title></title>
</head>
<body>
<input id="Button1" type="button" value="button" />
</body>
</html>
½«Æä±£´ ......
<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=" ......