Código PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>test</title>
<script>
function addCss(cssCode) {
var styleElement = document.createElement("style");
styleElement.type = "text/css";
if (styleElement.styleSheet) {
styleElement.styleSheet.cssText = cssCode;
} else {
styleElement.appendChild(document.createTextNode(cssCode));
}
document.getElementsByTagName("head")[0].appendChild(styleElement);
}
function noseleccionar(){
for(i=0;i<document.body.childNodes.length;i++){
if(document.body.childNodes[i].nodeType!=1 || document.body.childNodes[i].nodeName=='FORM')continue;
//alert(document.body.childNodes[i].nodeName)
document.body.childNodes[i].setAttribute('unselectable','on');
cssCode=document.body.childNodes[i].nodeName+'{-moz-user-select:none}'
addCss(cssCode);
}
}
window.onload=noseleccionar;
</script>
</head>
<body>
<div>ccccccccccc</div>
<form id="form1" name="form1" method="post" action="">
<textarea name="textarea">sss sssss sssssssss</textarea>
</form>
</body>
</html>