|
Disable Text Selection Script |
|
|
|
| Written by Administrator, on 26-02-2008 20:28 |
| Editor's rating |
 |
|
| Average user rating |
(1 vote) |
|
| Views |
604  |
|
This script will disable text selection at your website or blog. I have tested the script in Blogspot.com. Thank you to DynamicDrive.com
01.
Go to your Blogspot dashboard
02.
Choose Layout > Click Page Elements tab > Add Page Elements.
03.
Choose HTML/Javascript > Paste the "Disable Text Selection" script in the text box. (Right Click> View Image: To enlarge the image).
04.
Save and View Blog. Then, Test it! Good Luck!
Disable Text Selection Script
<script type="text/javascript">
/***********************************************
* Disable Text Selection script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
function disableSelection(target){
if (typeof target.onselectstart!="undefined") //IE route
target.onselectstart=function(){return false}
else if (typeof target.style.MozUserSelect!="undefined") //Firefox route
target.style.MozUserSelect="none"
else //All other route (ie: Opera)
target.onmousedown=function(){return false}
target.style.cursor = "default"
}
disableSelection(document.body) //Disable text selection on entire body;
</script>
Last update: 13-04-2008 21:44
Users' Comments (1)
|
|
|