Keyboard keys
$ (document). Ready (function () {
$ (document). Bind ("ContextMenu", function (e) {
return false;
});
});
A little different.
$ (' body '). Bind ("Selectstart", function () {return false;});
You can use it if you want to ban copying in Firfox.
Body
{
-moz-user-focus:ignore;
-moz-user-select:none;
}
To define the
The following are some of the keyboard key codes that are disabled.
function key () {
if (Event.shiftkey) {
Window.close ();
}
No selection allowed
var omitformtags = ["Input", "textarea", "select"]
Omitformtags = Omitformtags.join ("|")
function Disableselect (e) {
if (Omitformtags.indexof (e.target.tagname.tolowercase ()) = = 1)
return False
}
function reenable () {
return True
}
if (typeof Document.onselectstart!= "undefined")
Document.onselectstart = new Function ("return false")
else {
Document.onmousedown = Disableselect
Document.onmouseup = reenable
}
All function references in this tutorial
. Ready (Handler)
Handlera function to execute after the DOM is ready.
(document). How ready () is implemented
If (jquery.browser.msie && window = top) (function () { 2 if (jqu Ery.isready) return; 3 try { 4 Document.documentelement.doscroll ("left"); 5 } catch ( Error) { 6 settimeout (Arguments.callee, 0); 7 return; 8} 9//and Execute Any waiting functions Jquery.ready (); 11}) (); 12 13 ... Jquery.event.add (window, load, jquery.ready);