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?

Coder
  • 6,948
  • 13
  • 56
  • 86
xsong
  • 630
  • 1
  • 5
  • 18

2 Answers2

0

You can disable the user selection in css -

table{
  -webkit-user-select:none;
  -moz-user-select:none;
  user-select:none;
}
Adil Shaikh
  • 44,509
  • 17
  • 89
  • 111
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
  • 630
  • 1
  • 5
  • 18