[Hanna Võ] - 1 . Không Cho Click Chuột Phải ... 

Code:
HTML Code:
<SCRIPT language=JavaScript1.1>
function right(e) {
if (navigator.appName == 'Netscape' && 
(e.which == 3 || e.which == 2))
return false;
else if (navigator.appName == 'Microsoft Internet Explorer' && 
(event.button == 2 || event.button == 3)) {
alert('Chuc Mot Ngay Vui ve - Gui Wedsite Cho Ban Be Cua Minh Nha !');
return false;
}
return true;
}
document.onmousedown=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=right;
</SCRIPT>

2 . CODE Làm Thanh Tiêu Đề Web Chạy Trên Task Manager Khi Đóng Mở Web ..
HTML Code:
<script language=javascript >

title_tmp1=document.title
if (title_tmp1.indexOf(">>")!=-1){
title_tmp2=title_tmp1.split(">>");
title_last="*~*"+title_tmp2[1];
title_last=title_last + "*~*" + title_tmp2[2];
}else{

if (title_tmp1.indexOf("*~*")!=-1){
title_tmp2=title_tmp1.split("*~*");
title_last="*~*"+title_tmp2[1];
if (title_last=="*~*"){title_last="*~*"};
if (title_last=="*~*"){title_last="*~*"};
}
else { title_last=" wWw.KyNiemB2.Top1.Vn "}
}


title_new=""+title_last+""
step=0

function flash_title()
{
step++
if (step==8) {step=1}
if (step==1) {document.title='[----*'+title_new+'*----]'}
if (step==2) {document.title='[---*-'+title_new+'-*---]'}
if (step==3) {document.title='[--*--'+title_new+'--*--]'}
if (step==4) {document.title='[-*---'+title_new+'---*-]'}
if (step==5) {document.title='[--*--'+title_new+'--*--]'}
if (step==6) {document.title='[---*-'+title_new+'-*---]'}
if (step==7) {document.title='[----*'+title_new+'*----]'}
setTimeout("flash_title()",180);
}
flash_title()

</script>


3 . CODE Chống Click Chuột Phải ... Và Làm "Giật Giật Web Nêu Người Xem Cứ Cố ý Click Right ... 
HTML Code:
<SCRIPT language=JavaScript>
document.onmousedown=click
var times=0
var times2=10
function click() {
if ((event.button==2) || (event.button==3)) {
if (times>=1) { earthquake() }
alert("Ban Ko Dc Click Chuot Phai"); 
times++ } }
function earthquake() {
alert("Ban Ko Dc Click Chuot Phai");
window.moveTo(0, 0)
window.moveTo(1, 1)
window.moveTo(2, 2)
window.moveTo(3, 3)
window.moveTo(4, 4)
window.moveTo(5, 5)
window.moveTo(6, 6)
window.moveTo(7, 7)
window.moveTo(8, 8)
window.moveTo(9, 9)
window.moveTo(10, 10)
window.moveTo(9, 9)
window.moveTo(8, 8)
window.moveTo(7, 7)
window.moveTo(6, 6)
window.moveTo(5, 5)
window.moveTo(4, 4)
window.moveTo(3, 3)
window.moveTo(2, 2)
window.moveTo(1, 1)
alert("Giat Nhu Fiml Nha??!")
tremmors()
}
function tremmors() {
window.moveTo(0, 0)
window.moveTo(1, 1)
window.moveTo(2, 2)
window.moveTo(3, 3)
window.moveTo(4, 4)
window.moveTo(5, 5)
window.moveTo(6, 6)
window.moveTo(7, 7)
window.moveTo(8, 8)
window.moveTo(9, 9)
window.moveTo(10, 10)
window.moveTo(11, 11)
window.moveTo(12, 12)
window.moveTo(9, 9)
window.moveTo(8, 8)
window.moveTo(7, 7)
window.moveTo(6, 6)
window.moveTo(5, 5)
window.moveTo(4, 4)
window.moveTo(3, 3)
window.moveTo(2, 2)
window.moveTo(1, 1)
tremmors()
}
</SCRIPT>

4 . CODE Làm Con Chuột Có Mấy Cái Vòng Chạy Chạy Xung Quanh ...
HTML Code:
<script language="JavaScript">
<!-- Mouse Attack by Kurt Grigg - http://www.btinternet.com/~kurt.grigg/javascript

var num=10;//Number of dots!
var vel=20;//Speed!
var col=new Array('#0080ff','#ffffff','#0000ff','#44ccff');//Dot colours, min 2!
var stopafter=60; //Stop and clear after x secondS!
//Nothing needs altering past here....................
var MAy=0;
var MAx=0;
var py=0;
var px=0;
var angle=0;
var distance=0;
var rep;
var ry=0;
var rx=0;
var tmr=null;
var n4=(document.layers);
var n6=(document.getElementById&&!document.all);
var ie=(document.all);
var o6=(navigator.appName.indexOf("Opera") != -1)?true:false;
var _d=(n4||ie)?'document.':'document.getElementById(" ';
var _a=(n4||n6)?'':'all.';
var _r=(n6)?'")':'';
var _s=(n4)?'':'.style';
var v=(n4)?"show":"visible";
var put=false;
stopafter*=1000;
if (n4||n6){
window.captureEvents(Event.MOUSEMOVE);
function mouse1(e){
if (put) return false;
MAy = e.pageY-window.pageYOffset;
MAx = e.pageX;
}
if (n4) window.onMouseMove=mouse1; 
else document.onmousemove=mouse1;
}
if (ie||o6){
function mouse2(){
if (put) return false;
MAy = (ie)?event.clientY:event.clientY-window.pageYOffset;
MAx = event.clientX;
}
document.onmousemove=mouse2;
}
if (n4){
for (inc=0; inc < num; inc++)
document.write('<layer name=dots'+inc+' top=0 left=0 width='+inc/3+' height='+inc/3+' bgcolor=#ffffff></layer>');
}
else{
if (ie&&!o6){
document.write("<div id='outer' style='position:absolute;top:0px;left:0px'>");
document.write("<div style='position:relative'>");
}
for (inc=0; inc < num; inc++)
document.write('<div id="dots'+inc+'" style="position:absolute;top:0px;left:0px;width:'+ inc/3+';height:'+inc/3+';background:#ffffff;font-size:1">.</div>');
if (ie&&!o6) document.write("</div></div>");
}
function pos(){
h=(ie)?document.body.clientHeight:window.innerHeig ht-20;
w=(ie)?document.body.clientWidth:window.innerWidth-20;
ry=Math.round(Math.random()*h);
rx=Math.round(Math.random()*w);
rep=Math.round(Math.random()*3);
if (rep == 3)ry=0;
if (rep == 2)ry=h;
if (rep == 1)rx=0;
if (rep == 0)rx=w;
py=ry;
px=rx;
}
pos();
function followleader(){
sy=(!ie)?window.pageYOffset:0;
sx=(!ie)?window.pageXOffset:0;
if (ie) outer.style.top=document.body.scrollTop;
for (inc=0; inc < num; inc++){
randomcol=col[Math.floor(Math.random()*col.length)];
temp1=eval(_d+_a+"dots"+inc+_r+_s);
temp1.visibility=v;
if (inc < num-1){
temp2=eval(_d+_a+"dots"+(inc+1)+_r+_s);
temp1.top=temp2.top;
temp1.left=temp2.left
}
else{
temp1.top=py+sy;
temp1.left=px;
}
if (n4)temp1.bgColor=randomcol;
else temp1.background=randomcol;
}
}
function bomb(){
ay=MAy-py;
ax=MAx-px;
angle=Math.round(Math.atan2(ay,ax)*180/Math.PI);
if (angle < 0) angle += 360;
MAdy=py-MAy;
MAdx=px-MAx;
distance=Math.floor(Math.sqrt(MAdx*MAdx+MAdy*MAdy) );
go_y = Math.round(vel*Math.sin(angle*Math.PI/180));
go_x = Math.round(vel*Math.cos(angle*Math.PI/180));
py+=go_y;
px+=go_x;
if (distance < vel) pos();
followleader();
tmr=setTimeout("bomb()",20);
}
bomb();
function dsbl(){
v=(n4)?"hide":"hidden";
put=true;
MAx=0;
MAy=0;
setTimeout('clearTimeout(tmr)',stopafter+100);
}
setTimeout('dsbl()',stopafter);
//-->
</script>

Post a Comment

Chú ý:
- Nhận xét nên viết tiếng việt có dấu.
- Cảm ơn bạn đã đọc bài viết tại www.hannavn.com