如何在鼠标拖动上制作可调整大小的html表格?

时间:2012-04-26 07:32:11

标签: html-table resize drag

我想在html中创建一个包含2列和3行的表,但如果我们从其角落拖动鼠标,它应该调整大小。

2 个答案:

答案 0 :(得分:2)

使用colResizable,jquery plugin to resize html tables and columns

示例html

<table id="sample">
    <tr> <td>cell</td> <td>cell</td> <td>cell</td> </tr>
</table>

示例js:

$("#sample").colResizable({liveDrag:true});

答案 1 :(得分:0)

使用jQuery UI,它具有resizable功能来制作HTML元素,例如一张桌子,可以调整大小。