I am pretty sure i seen sites that make firefox (and other browsers?) select text only within a div and not span across other divs. How do i do that
A:
Based on this.
<html>
<head>
<title>No Select!</title>
<script>
window.onload = function() {
document.onselectstart = function() {return false;} // ie
document.onmousedown = function() {return false;} // mozilla
}
</script>
</head>
<body>
Select me!
</body>
</html>
By the way try to avoid this kind of stuff as it's not cool to prevent visitors from their basic rights!! If someone wants to select a text, they'll know how to do it and there's no way to prevent it.
Hamid Nazari
2010-08-09 07:40:10
maybe the title confused you. i revised it
acidzombie24
2010-08-09 07:46:42
you mean when the user presses Ctrl+A?
Hamid Nazari
2010-08-09 10:33:42