Prevent selection:
HTML
<img style="moz-user-select: none" unselectable="on" onseletstart="return false;" />
or JavaSript
function preventSelection(element) {
element.style.MozUserSelect = 'none';
element.unselectable = 'on';
element.onselectstart = function() { return false; };
}
Prevent drag for images and links:
HTML
<img onmousedown="return false;" ondragstart="return false;" />
or JavaScript
function preventDrag(element) {
element.onmousedown = function() { return false; };
element.ondragstart = function() { return false; }; //I.E.
}
Hello David,
ReplyDeleteYou don't mention were to place the codes