日期:2014-05-16 浏览次数:20529 次
<script type="text/javascript">
$(function () {
$("#myTable2 tr ").bind({
"keydown":function(e){
var Key=e.keyCode||e.which||e.charCode;
if (Key == 107 || Key == 187)//187是右边数字小键盘上的,107是左边退格键旁边的
{
$(this).clone(true).insertAfter(this);
}
},
"click":function(e){
$(this).clone(true).insertAfter(this);
}
})
});
</script>
<table border="1" width="200" style="width:200px;height:20px;" id="myTable2">
<tbody><tr tabindex="0"><td>原始内容</td></tr></tbody>
</table>