function FiltrationHTML(HTML)
{
var temp = HTML;
var url=http://www.rr555.com/news/newsview.php?nid=1877
temp = temp.replace(/]*?>(.|\n)*?<\/script>/gim,""); //过滤
temp = temp.replace(/<(p |p>)/gi, "『〈$1"); //分段


temp = temp.replace(/<(\/p)/gi, "『〈$1"); //分段


temp = temp.replace(/<(sup>)/gi, "『〈$1"); //上标
temp = temp.replace(/<(\/sup)/gi, "『〈$1"); //上标末

temp = temp.replace(/<(sub)/gi, "『〈$1"); //下标
temp = temp.replace(/<(\/sub)/gi, "『〈$1"); //下标末

temp = temp.replace(/<(table)/gi, "『〈$1"); //表格
temp = temp.replace(/<(\/table)/gi, "『〈$1"); //表格末

temp = temp.replace(/<(tr |tr>)/gi, "『〈$1"); //行
temp = temp.replace(/<(\/tr)/gi, "『〈$1"); //行末
temp = temp.replace(/<(td |td>)/gi, "『〈$1");//列
temp = temp.replace(/<(\/td)/gi, "『〈$1"); //列末
temp = temp.replace(/<(img )/gi, "『〈$1"); //图片
temp = temp.replace(/<(br)/gi, "『〈$1"); //换行符

temp = temp.replace(/(『〈[^>]*)>/gi,"$1〉』"); //右括号

temp = temp.replace(/<[^>]*>/gi,""); //过滤其它所有"<...>"标签
temp = temp.replace(/\ /gi," "); //替换所有 为空格

temp = temp.replace(/『〈/gi,"<"); //恢复<
temp = temp.replace(/〉』/gi,">"); //恢复>

temp = temp.replace(/(]*(>)/gi,"$1 border=\"1\" cellpadding=\"1\" cellspacing=\"1\" style=\"border-collapse: collapse\" bordercolor=\"#333333\" width=\"100\%\"$2"); //清除表格属性并加样式
temp = temp.replace(/(<[^>]*)colspan(=[^\s>]*)/gi,"$1 『col$2』"); //给中需要的属性加『』
temp = temp.replace(/(<[^>]*)rowspan(=[^\s>]*)/gi,"$1 『row$2』"); //给中需要的属性加『』

temp = temp.replace(/(]*(>)/gi,"$1$2"); //清除TR属性
temp = temp.replace(/(『]*(>)/gi,"$1$2"); //清除不包含『』的TD的属性
temp = temp.replace(/(『]*『/gi,"$1『"); //替换 temp = temp.replace(/(<[^>』]*』)[^>]*(『[^>『]*>)/gi,"$1$2"); //替换『』...『』之间内容
temp = temp.replace(/(』)[^>』]*(>)/gi,"$1$2"); //替换『』...>之间内容
temp = temp.replace(/]*>/gi,"

"); //清除

中多余属性

temp = temp.replace(/『(col)(=\d{1,4})』/gi," $1"+"span"+"$2"); //还原 colspan
temp = temp.replace(/『(row)(=\d{1,4})』/gi," $1"+"span"+"$2"); //还原 rowspan
temp = temp.replace(/(]*(>)/gi,"$1 src=\"\""+"$2"); //替换

return temp;
}