Buon giorno,
E' possibile impedire la selezione del testo o immagini all'interno di un div e non su tutto il documento?
Grazie,
Alex
Buon giorno,
E' possibile impedire la selezione del testo o immagini all'interno di un div e non su tutto il documento?
Grazie,
Alex
bisogna impostare gli eventi onselectstart ed onmousedown sull'elemento per il quale bloccare la selezione:
Codice da: http://javascript.internet.com/page-...selection.html
codice:/* You can attach the events to any element. In the following example I'll disable selecting text in an element with the id 'content'. */ window.onload = function() { var element = document.getElementById('content'); element.onselectstart = function () { return false; } // ie element.onmousedown = function () { return false; } // mozilla }
I DON'T Double Click!
Grazie mille!