62,268
社区成员
发帖
与我相关
我的任务
分享
<table>
<tr>
<td id="aaa">aaa </td>
<td id="bbb">bbb </td>
</tr>
</table>
<table>
<tr>
<td id="ccc">ccc </td>
</tr>
</table>
<input type="hidden" id="td1" name="td1"/>
<input type="hidden" id="td2" name="td2"/>
<input type="hidden" id="td3" name="td3"/>
document.getElementById("td1").value = document.getElmentById("aaa").innerHTML
document.getElementById("td2").value = document.getElmentById("bbb").innerHTML
document.getElementById("td3").value = document.getElmentById("ccc").innerHTML
string html = "...";//内容略
Regex reg = new Regex("<td>.+?</td>");
Match mat = reg.Match(html);
string str = "";
while(mat.Success)
{
str += mat.Value.Substring(4, mat.Length-9);
mat = reg.Match(html, mat.Index+mat.Length);
}
//保存str