How to make HTML table “Excel-like” editable for multiple cells, i.e. simultaneous copy-paste features?

后端 未结 2 1616
死守一世寂寞
死守一世寂寞 2021-02-03 11:14

I need my HTML table to be editable so that user inserted data could be sent to the server. However due to the table\'s size (50 rows) it would not be convenient for users to in

2条回答
  •  耶瑟儿~
    2021-02-03 11:58

    you can achieve this easily by adding handsontable

    change any div to a excel table

    var $container = $("#divid");
    $container.handsontable({
    data: getData(),
    rowHeaders: true,
    colHeaders: true,
    contextMenu: true  //forces dom to use custom right click functionality like add row delete row add column etc 
    });
    

    jsFiddle : http://jsfiddle.net/jwtskyLa/

提交回复
热议问题