您可以尝试这样的事情(使用 jQuery):
HTML:
<div id="content" style="display: none;">
<div>
<table>
<tr>text here and then some input tag
</tr>
</table>
<table>
<tr>text here and then some input tag
</tr>
<tr>text here and then some input tag
</tr>
</table>
<table>
<tr>text here and then some input tag
</tr>
</table>
</div>
</div>
<div id="receiver1" style="background: #FF0000;"></div>
<div id="receiver2" style="background: #00FF00;"></div>
<div id="receiver3" style="background: #0000FF;"></div>
JS:
$(function(){
var theContent = $( "#content" ).html();
$( "#receiver1" ).html( theContent );
$( "#receiver2" ).html( theContent );
$( "#receiver3" ).html( theContent );
});
您可以在此处查看示例:http: //jsfiddle.net/3hm6N/1/
当然,您可以使用 Greg Pettit 所说的方法。另一件事,我没有看到它,但是您的表格格式错误,因为标签里面应该有<td>
s 或<th>
s 。