Home >Web Front-end >JS Tutorial >COOL and practical dynamic effects_time and date

COOL and practical dynamic effects_time and date

WBOY
WBOYOriginal
2016-05-16 19:27:40935browse

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.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn