js应该能实现吧,我用c#写了一段:
string hehehehe = "<td>123</td><td>345</td><td>456</td>";
int intSum=0;
Regex r;
Match m;
r = new Regex("<td>(.*?)</td>",RegexOptions.IgnoreCase|RegexOptions.Compiled);
for (m = r.Match(hehehehe); m.Success; m = m.NextMatch())
{
intSum = intSum+Int32.Parse(m.Groups[1].value.ToString());
}
Response.Write("<br>"
![](images/wink.gif)
;
Response.Write(intSum.ToString());