0

I have coded a JQuery plug-in, but there are some troubles with that. I want to select multi-row in a table by pressing down the shift key and click a table row, but when I selected some browser, its default style is added to the selected text. I don't have enough reputation to post a picture. Please click here to see the picture.

how can I wipe out those style?

Shiju K Babu
  • 6,699
  • 11
  • 51
  • 82
xsong
  • 460
  • 1
  • 4
  • 15

2 Answers2

0

You can disable the user selection in css -

table{
  -webkit-user-select:none;
  -moz-user-select:none;
  user-select:none;
}
Mohammad Adil
  • 44,013
  • 17
  • 87
  • 109
0

finally,I get a way to solve this problem,by preventing text be selected.code as follows

if (typeof document.onselectstart!="undefined")
    document.onselectstart=new Function ("return false");
else{
    document.onmousedown=false;
    document.onmouseup=true;
}

But, I have never been able to select the text.

xsong
  • 460
  • 1
  • 4
  • 15