Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (151.67 KB, 17 trang )
<span class='text_page_counter'>(1)</span><div class='page_container' data-page=1>
<b>Tạo 1 Button Giờ Trên Website</b>
Trích:
<SCRIPT language=JavaScript>
<!-- Begin
day = new Date();
miVisit = day.getTime();
function clock() {
dayTwo = new Date();
hrNow = dayTwo.getHours();
mnNow = dayTwo.getMinutes();
scNow = dayTwo.getSeconds();
miNow = dayTwo.getTime();
if (hrNow == 0) {
hour = 12;
ap = " AM";
} else if(hrNow <= 11) {
ap = " AM";
hour = hrNow;
} else if(hrNow == 12) {
ap = " PM";
hour = 12;
} else if (hrNow >= 13) {
hour = (hrNow - 12);
ap = " PM";
}
if (hrNow >= 13) {
hour = hrNow - 12;
}
if (mnNow <= 9) {
min = "0" + mnNow;
}
else (min = mnNow)
if (scNow <= 9) {
secs = "0" + scNow;
} else {
secs = scNow;
}
time = hour + ":" + min + ":" + secs + ap;
document.form.button.value = time;
self.status = time;
setTimeout('clock()', 1000);
}
function timeInfo() {
milliNow = miNow - miVisit;
secsVisit = Math.round(milliNow / 1000);
minsVisit = Math.round((milliNow / 1000) / 60);
alert("There have been " + milliSince + " milliseconds since midnight, January 1, 1970. "
+ "You have spent " + milliNow + " of those milliseconds on this page. "
+ ".... About " + minsVisit + " minutes, and "
+ secsVisit + " seconds.");
}
document.write("<center><form name=\"form\">"
+ "<input type=button value=\"Click for info!\""
onError = null;
clock();
// End -->
</SCRIPT>
<b>Doan Code nghe nhac online</b>
<OBJECT ID="MediaOnline"
classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
codebase=" />1,52,701" standby="Loading Microsoft Windows Media Player components..."
type="application/x-oleobject" >
<param name="Filename" value="file de o day">
<PARAM NAME="ShowControls" VALUE="-1">
<PARAM NAME="ShowDisplay" VALUE="0">
<PARAM NAME="ShowStatusBar" VALUE="-1">
<PARAM NAME="AutoSize" VALUE="0">
<param name="AudioStream" value="-1">
<param name="AutoStart" value="-1">
<param name="AnimationAtStart" value="-1">
<param name="AllowScan" value="-1">
<param name="AllowChangeDisplaySize" value="-1">
<param name="AudioStream" value="-1">
<param name="AutoStart" value="-1">
<param name="AnimationAtStart" value="-1">
<param name="AllowScan" value="-1">
<param name="AllowChangeDisplaySize" value="-1">
<param name="AutoRewind" value="0">
<param name="Balance" value="0">
<param name="BaseURL" value>
<param name="BufferingTime" value="5">
<param name="DisplayBackColor" value="0">
<param name="DisplayForeColor" value="16777215">
<param name="DisplayMode" value="0">
<param name="DisplaySize" value="4">
<param name="Enabled" value="-1">
<param name="EnableContextMenu" value="false">
<param name="EnablePositionControls" value="-1">
<param name="EnableFullScreenControls" value="0">
<param name="EnableTracker" value="-1">
<param name="PlayCount" value="5">
<param name="PreviewMode" value="0">
<param name="Rate" value="1">
<param name="SAMILang" value>
<param name="SAMIStyle" value>
<param name="SAMIFileName" value>
<param name="SelectionStart" value="-1">
<param name="SelectionEnd" value="-1">
<param name="SendOpenStateChangeEvents" value="-1">
<param name="SendWarningEvents" value="-1">
<param name="SendErrorEvents" value="-1">
<param name="SendKeyboardEvents" value="0">
<param name="SendMouseClickEvents" value="0">
<param name="SendMouseMoveEvents" value="0">
<param name="SendPlayStateChangeEvents" value="-1">
<param name="ShowCaptioning" value="0">
<param name="ShowAudioControls" value="-1">
<param name="ShowGotoBar" value="0">
<param name="ShowPositionControls" value="-1">
<param name="ShowTracker" value="-1">
<param name="TransparentAtStart" value="0">
<param name="VideoBorderWidth" value="0">
<param name="VideoBorderColor" value="0">
<param name="VideoBorder3D" value="0">
<param name="Volume" value="-180">
<param name="WindowlessVideo" value="0">
<Embed type="application/x-mplayer2"
pluginspage=" />/" file="file de o day"
src="../../../../spritps/php/music/musc_cool/MediaOnline/templates/play.php"
ShowControls="1" ShowDisplay="0" ShowStatusBar="1" width="350" height="300">
</OBJECT> .
<b>Doan Code chen MP3</b>
<embed style="height:25px; width:400px; " type="application/x-shockwave-flash"
src=" link nhạc .mp3"
flashvars="autoplay=true" allowScriptAccess="none"></embed>
<b>Doan Code AutoPlay cho Web</b>
<b><object width="300" height="270"><param name="movie" </b>
<b>value=" /><param name="quality" value="high" /><param </b>
<b>name="wmode" value="transparent" /><param name="flashvars" value="&autostart=true" </b>
<b>/><embed src=" quality="high" wmode="transparent" </b>
<b>type="application/x-shockwave-flash" flashvars="&autostart=true" width="300" </b>
<b>Share cho mọi người cái code Thời tiết trên blog plus mà Nhi đang sử dụng nhá ...ai thích</b>
<b>lấy sử dụng đi he..thanks cho bạn 1 cái làm wen thui đủ rùi ..heheChúc mọi người zui</b>
<b>zẽ..he' he'</b>
<div>
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="center">
src=" />ions/48820.gif"
alt="Ha Noi" height="41" width="127">
<br /><br />
Cố đô Huế<br />
<img
src=" />ions/48852.gif"
alt="Co Do Hue" height="41" width="127"><br /><br />
Tp Hồ Chí Minh
<br /><img
src=" />ions/48900.gif"
alt="Ho Chi Minh" height="41" width="127"><br /><br />
Tp Ðà Nẵng<br />
<img
src=" />ions/48855.gif"
alt="Da Nang" height="41" width="127"><br /><br />
</td>
</tr>
</table>
</div>
CAO BẰNG <a href=" />bannertypeclick=gizmotimetemp"> <img
src=" />obal/stations/48808.gif" alt="Click for Cao Bang, Viet Nam Forecast" border="0" width="127"
height="41"/></a> <br />
BẮC KẠN <a href=" />bannertypeclick=gizmotimetemp"> <img
SƠN LA <a href=" />bannertypeclick=gizmotimetemp"> <img
src=" />obal/stations/48806.gif" alt="Click for Son La, Viet Nam Forecast" border="0" width="127"
height="41"/></a> <br />
LẠNG SƠN <a href=" />bannertypeclick=gizmotimetemp"> <img
src=" />obal/stations/48830.gif" alt="Click for Lang Son, Viet Nam Forecast" border="0" width="127"
height="41"/></a> <br />
LÀO CAI (SAPA) <a href=" />bannertypeclick=gizmotimetemp"> <img
src=" />obal/stations/48803.gif" alt="Click for Lao Cai, Viet Nam Forecast" border="0" width="127"
height="41"/></a> <br />
THÁI NGUYÊN <a href=" />bannertypeclick=gizmotimetemp"> <img
src=" />obal/stations/48831.gif" alt="Click for Thai Nguyen, Viet Nam Forecast" border="0"
width="127" height="41"/></a> <br />
MÓNG CÁI – QUẢNG NINH <a
href=" />bannertypeclick=gizmotimetemp"> <img
src=" />obal/stations/48838.gif" alt="Click for Mong Cai, Viet Nam Forecast" border="0" width="127"
height="41"/></a> <br />
NAM ĐỊNH <a href=" />bannertypeclick=gizmotimetemp"> <img
src=" />obal/stations/48823.gif" alt="Click for Nam Dinh, Viet Nam Forecast" border="0" width="127"
height="41"/></a> <br />
THANH HÓA <a href=" />bannertypeclick=gizmotimetemp"> <img
src=" />obal/stations/48840.gif" alt="Click for Thanh Hoa, Viet Nam Forecast" border="0"
width="127" height="41"/></a> <br />
VINH – NGHỆ AN <a href=" />bannertypeclick=gizmotimetemp"> <img
height="41"/></a> <br />
HÀ TĨNH <a href=" />bannertypeclick=gizmotimetemp"> <img
src=" />obal/stations/48846.gif" alt="Click for Ha Tinh, Viet Nam Forecast" border="0" width="127"
height="41"/></a> <br />
ĐỒNG HỚI – QUẢNG BÌNH <a
href=" />bannertypeclick=gizmotimetemp"> <img
src=" />obal/stations/48848.gif" alt="Click for Dong Hoi, Viet Nam Forecast" border="0" width="127"
height="41"/></a> <br />
HUẾ <a href=" />bannertypeclick=gizmotimetemp"> <img
src=" />obal/stations/48852.gif" alt="Click for Hue, Viet Nam Forecast" border="0" width="127"
height="41"/></a> <br />
ĐÀ NẴNG <a href=" />bannertypeclick=gizmotimetemp"> <img
src=" />obal/stations/48855.gif" alt="Click for Da Nang, Viet Nam Forecast" border="0" width="127"
height="41"/></a> <br />
HOÀNG SA – ĐÀ NẴNG <a
href=" />bannertypeclick=gizmotimetemp"> <img
src=" />obal/stations/48860.gif" alt="Click for Hoang Sa, Viet Nam Forecast" border="0" width="127"
height="41"/></a> <br />
QUY NHƠN <a href=" />bannertypeclick=gizmotimetemp"> <img
src=" />obal/stations/48870.gif" alt="Click for Qui Nhon, Viet Nam Forecast" border="0" width="127"
height="41"/></a> <br />
NHA TRANG – KHÁNH HÒA <a
href=" />bannertypeclick=gizmotimetemp"> <img
src=" />obal/stations/48877.gif" alt="Click for Nha Trang, Viet Nam Forecast" border="0"
href=" />bannertypeclick=gizmotimetemp"> <img
src=" />obal/stations/48920.gif" alt="Click for Truong Sa, Viet Nam Forecast" border="0" width="127"
height="41"/></a>
<b>Code đồng hồ</b>
<embed type="application/x-shockwave-flash" allowscriptaccess="never"
src=' width='150'
height='200'/></embed>
<b>Banner tự động chạy đây !</b>
Phần code đây
<html>
<head>
<LINK href="zing_banner.css"
type=text/css rel=stylesheet>
<SCRIPT src="zing_trangchu/anh_thu.js" type=text/javascript></SCRIPT>
<style>
<!--img { border:0 }
-->
</style>
</head>
<BODY background="images/bg_hoa.gif">
<body topmargin="0" leftmargin="0">
<center>
<table border=0 width=780 cellspacing=0 cellpadding=0 >
<tr><td align=center>
<SCRIPT type=text/javascript>
<!--var focus_width=780;
var focus_height=260;
var text_height=0;
//-->
</SCRIPT>
<SCRIPT language=javascript type=text/javascript>
<!--var xsImgs = new Array("banner.jpg","banner1.jpg","banner2.jpg","ba
nner3.jpg","banner4.jpg","banner5.jpg","banner6.jp g","banner7.jpg","banner8.jpg");
var xsImgLinks = new Array(" />var xsImgTexts = new Array(" "," "," ");
var xsImgSize = new Array(focus_width, focus_height);
</SCRIPT>
<b>Tương tự như đoạn mã đã từng giới thiệu, nhưng ngắn hơn </b>
<b>Lưu ý :</b>
++Cái này không viết thẳng vào web được , dùng Notepad dán đoạn mã dưới đây rồi lưu lại với file có đi js
và định dạng font là UTF-8(VD : xemlich.js)
++Để sử dụng , chèn câu lệnh sau vào nơi bạn thích (tốt nhất là dưới thẻ </body>)
CODE
<script SRC="xemlich.js"></script>
<= Chú ý đặt đường dẫn cho đúng .
CODE
<!-- Hiển thị lịch dạng phân bố-->
<!-- -->
<!-- Begin
var day_of_week = new Array('Chủ nhật','Thứ hai','Thứ ba','Thứ tư','Thứ năm','Thứ sáu','Thứ bảy');
var month_of_year = new Array('Tháng 01','Tháng 02','Tháng 03','Tháng 04','Tháng 05','Tháng 06','Tháng
07','Tháng 08','Tháng 09','Tháng10',' Tháng11','Tháng 12');
var Calendar = new Date();
var year = Calendar.getFullYear();
var month = Calendar.getMonth();
var today = Calendar.getDate();
var weekday = Calendar.getDay();
var DAYS_OF_WEEK = 7;
var DAYS_OF_MONTH = 31;
var cal;
Calendar.setDate(1);
Calendar.setMonth(month);
// Display variables //
var TR_start = '<tr>';
var TR_end = '</tr>';
var highlight_start = '<td width="30"><b>';
var highlight_end = '</b></td>';
var TD_start = '<td width="30" align="center">';
var TD_end = '</td>';
cal = '<table border="1" cellspacing="0" cellpadding="0" class="borderwrap"><tr><td>';
cal += '<table border="1" cellspacing="0" cellpadding="1">' + TR_start;
cal += '<td colspan="' + DAYS_OF_WEEK + '" class="row2" align="center"><b><font color=green>';
cal += month_of_year[month] + ' ' + year + '</font></b>' + TD_end + TR_end;
cal += TR_start;
for(index=0; index < DAYS_OF_WEEK; index++)
if(weekday == index)
cal += TD_start + '<b><font color=red>' + day_of_week[index] + '</font></b>' + TD_end;
else
cal += TD_end + TR_end;
cal += TR_start;
for(index=0; index < Calendar.getDay(); index++)
cal += TD_start + ' ' + TD_end;
for(index=0; index < DAYS_OF_MONTH; index++)
{
if( Calendar.getDate() > index )
{
week_day =Calendar.getDay();
if(week_day == 0)
cal += TR_start;
if(week_day != DAYS_OF_WEEK)
{
var day = Calendar.getDate();
if( today==Calendar.getDate() )
cal += highlight_start + day + highlight_end + TD_end;
else
cal += TD_start + day + TD_end;
}
if(week_day == DAYS_OF_WEEK)
cal += TR_end;
}
Calendar.setDate(Calendar.getDate()+1);
}
cal += '</table></td></tr></table>';
document.write(cal);
<b>Hiển thị ngày tốt – xấu trên web</b>
<script src=" />
url= />itle=Xem+ng%C3%A0y+t%E1%BB%91t+x%E1%BA%A5u+-+l%E1%BB%8Bch+v
<b>TỔNG HỢP CÁC LOẠI CODE VIẾT WEB</b>
1 . Khơng Cho Click Chuột Phải ...
Trích:
<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 ..
Trích:
<script language=javascript >
title_tmp1=document.title
if (title_tmp1.indexOf(">>")!=-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==2) {document.title='[---*-'+title_new+'-*---]'}
if (step==3) {document.title='[--*--'+title_new+'--*--]'}
if (step==4) {document.title='[-*---'+title_new+'---*-]'}
}
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 ...
Trích:
<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)
}
</SCRIPT>
4 . CODE Làm Con Chuột Có Mấy Cái Vịng Chạy Chạy Xung Quanh ...
Trích:
<script language="JavaScript">
<!-- Mouse Attack by Kurt Grigg - />
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 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 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);
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(){
put=true;
MAx=0;
MAy=0;
setTimeout('clearTimeout(tmr)',stopafter+100);
}
setTimeout('dsbl()',stopafter);
//-->