Код: Выделить всё
function disableSelection(target){
if (typeof target.onselectstart!="undefined") //For IE
target.onselectstart=function(){return false}
else if (typeof target.style.MozUserSelect!="undefined") //For Firefox
target.style.MozUserSelect="none"
else //All other route (For Opera)
target.onmousedown=function(){return false}
target.style.cursor = "default"
}
Вероятно также понадобится решение из моего букмарклета контекстного меню:
Код: Выделить всё
javascript:void(document.onmousedown=null);
void(document.onclick=null);
void(document.oncontextmenu=null)
Код: Выделить всё
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-o-user-select: none;
user-select: none;
Код: Выделить всё
SelectStartПодробнее здесь: https://stackoverflow.com/questions/710 ... javascript
Мобильная версия