Home > Article > Web Front-end > COOL and practical dynamic effects_time and date
When I was working on a project recently, the customer requested that the data in the table can be dragged and selected, so I wrote the following method using JS. Supports IE, FIREFOX and other browsers. Realize the selection of the entire row and column of data, select all, invert the selection, clear, and select all the cell data in the rectangular range dragged out of the data table.
PS:
1. If the data cell has no data, please set the ID to empty or remove the ID, and set the style to "inactive". This cell will be skipped when selecting.
2. If you do not want a certain cell to be selected, please set the class to "bg_green", then this cell will be skipped when selecting.