Cách thực hiện Chống copy hay quét khối trên blogspot - 越南求職徵才服務 việc làm tiếng Trung - 越南工作/求职/職缺,馬上猎聘/招聘人才

Post Top Ad

thenewjobtimes@gmail.com

2021年6月23日星期三

Cách thực hiện Chống copy hay quét khối trên blogspot

 



 1. Đăng nhập và vào bố cục

2. Chọn mẫu (template) => chỉnh sửa HTML (Edit HTML)
3. Sau đó hãy chọn code thủ thuật và chèn vào sau thẻ <head> (hoặc trước thẻ </head>)
3.1. Đây là code chống quét khối văn bản
<script language='JavaScript1.2'>
function disableselect(e){
return false
}
function reEnable(){
return true
}
//if IE4+
document.onselectstart=new Function ("return false")
//if NS6
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}
</script>
3.2. Đây là code chống sử dụng chuột phải
<script language='JavaScript'>
var msg="Welcome to KINH NGHIEP";
function disableIE() {if (document.all) {alert(msg);return false;}
}
function disableNS(e) {
if (document.layers||(document.getElementById&amp;&amp;!document.all)) {
if (e.which==2||e.which==3) {alert(msg);return false;}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);document.onmousedown=disableNS;
} else {
document.onmouseup=disableNS;document.oncontextmenu=disableIE;
}
document.oncontextmenu=new Function("alert(msg);return false")
</script>
- Hãy thay dòng chữ màu xanh trong code thành dòng chữ mà bạn muốn người đọc thấy được khi click chuột phải trên blog bạn.
4- Save template.và vào blog kiểm tra kết quả nha.

没有评论:

发表评论

Post Top Ad