I have a table with multiple columns. I want the contents of each column to be selected individually. When I start selecting the first column, the second, third ... is automatically selected. When I select one column, I want other columns to be inaccessible.
I tried applying the following class to elements and it worked fine in FF. No matter where you start the selection, you can never choose it.
.unselectable { user-select: none; -moz-user-select: none; -khtml-user-select: none; }
For IE, I tried a property called unselectable="on" . In Internet Explorer, it is still selected if the selection starts externally. I want to prevent the selection of certain columns, even the selection starts from the outside.
I tried using onselectionstart and onmouseover, but as the selection starts outside the element, they don't start.
Do I have any hope?
Thanks in advance.
javascript html javascript-events
Gopal
source share