js防複製、禁止右鍵
// JavaScript Document
$(function(){
$(document).bind("contextmenu",function(e){ return false; });
});
if (typeof(document.onselectstart) != "undefined") {
// IE下禁止元素被選取
document.onselectstart = new Function("return false");
} else {
// firefox下禁止元素被選取的變通辦法
document.onmousedown = new Function("return false");
document.onmouseup = new Function("return true");
}
$(function(){
$(document).bind("contextmenu",function(e){ return false; });
});
if (typeof(document.onselectstart) != "undefined") {
// IE下禁止元素被選取
document.onselectstart = new Function("return false");
} else {
// firefox下禁止元素被選取的變通辦法
document.onmousedown = new Function("return false");
document.onmouseup = new Function("return true");
}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.