Javascript examples for DOM HTML Element:Div
Stop text selection from going outside a div
<html> <head> <title>No Select!</title> <script> window.onload = function() { document.onselectstart = function() {return false;} // ie document.onmousedown = function() {return false;} // mozilla }//from ww w.ja v a 2 s.co m </script> </head> <body> Select me! <p>this is a test</p> </body> </html>