Quên mật khẩu?

Ẩn quảng cáo

 

 Link đổi màu tự động

Go down 
Tác giảThông điệp
Tan Vỡ™
~ Hội Chống Đối VTC ™
~ Hội Chống Đối VTC ™
Tan Vỡ™


Giới tính Giới tính : Nam Sagittarius
Chinese zodiac Chinese zodiac : Rooster
Bài viết Bài viết : 727
Xu Xu : 50000953
Thanked Thanked : 333
Sinh Nhật Sinh Nhật : 10/12/1993
Tham Gia Tham Gia : 25/07/2011
Tuổi Tuổi : 30
Yahoo Yahoo : Việt Nam™
Nghề Nghiệp Nghề Nghiệp : Đâm Thuê Chém Giết
Status Status : ღ♥ღღ♥ღNắm tay nhau đi giữa nhân gianღ♥ღღ♥ღ

Character sheet
Tài Sản:

Link đổi màu tự động Empty
Bài gửiTiêu đề: Link đổi màu tự động   Link đổi màu tự động EmptyFri Sep 23, 2011 8:59 am

<script LANGUAGE="JavaScript">

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! [You must be registered and logged in to see this link.] -->

<!-- Begin
function initArray() {
for (var i = 0; i < initArray.arguments.length; i++) {
this[i] = initArray.arguments[i];
}
this.length = initArray.arguments.length;
}
var colors = new initArray(
"red",
"blue",
"green",
"purple",
"black",
"tan",
"red");
delay = .5; // seconds
link = 0;
vlink = 2;
function linkDance() {
link = (link+1)%colors.length;
vlink = (vlink+1)%colors.length;
document.linkColor = colors[link];
document.vlinkColor = colors[vlink];
setTimeout("linkDance()",delay*1000);
}
linkDance();
// End -->
</script>
<p><a href="http://thangbombh.sg.st">Welcome to ThangBomBh Homepages !</a></p>

<!-- Be sure to include some links in your HTML page! -->

<!-- Script Size: 0.98 KB -->
----------------------------------
Chữ vòng quanh theo con trỏ
----------------------------------

Code:
<script LANGUAGE="JavaScript">
<!-- Original: ThangBomBH (thangbom_bh@yahoo.com) -->
<!-- Web Site: [You must be registered and logged in to see this link.] -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! [You must be registered and logged in to see this link.] -->

<!-- Begin
if (document.all) {
//Things you can alter
yourLogo = "Welcome to ThangBomBH Homepages !"; //Not less than 2 letters!
logoFont = "Arial";
logoColor = "000000";
//Nothing needs altering below!
yourLogo = yourLogo.split('');
L = yourLogo.length;
TrigSplit = 360 / L;
Sz = new Array()
logoWidth = 100;
logoHeight = -30;
ypos = 0;
xpos = 0;
step = 0.03;
currStep = 0;
document.write('<div id="outer" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i = 0; i < L; i++) {
document.write('<div id="ie" style=& quot;position:absolute;top:0px;left:0px;
'
+'width:10px;height:10px;font-family:'+logoFont+';font-size:12px;'
+'color:'+logoColor+';text-align:center">'+yourLogo[i]+'</div>');
}
document.write('</div></div>');
function Mouse() {
ypos = event.y;
xpos = event.x - 5;
}
document.onmousemove=Mouse;
function animateLogo() {
outer.style.pixelTop = document.body.scrollTop;
for (i = 0; i < L; i++) {
ie[i].style.top = ypos + logoHeight * Math.sin(currStep + i * TrigSplit * Math.PI / 180);
ie[i].style.left = xpos + logoWidth * Math.cos(currStep + i * TrigSplit * Math.PI / 180);
Sz[i] = ie[i].style.pixelTop - ypos;
if (Sz[i] < 5) Sz[i] = 5;
ie[i].style.fontSize = Sz[i] / 1.7;
}
currStep -= step;
setTimeout('animateLogo()', 20);
}
window.onload = animateLogo;
}
// End -->
</script>
<!-- Script Size: 1.93 KB -->
------------------------------------------------
Chữ chạy theo con trỏ, chữ này có bóng
------------------------------------------------

Code:
<script LANGUAGE="JavaScript">
<!-- Original: ThangBomBH (thangbom_bh@yahoo.com) -->
<!-- Web Site: [You must be registered and logged in to see this link.] -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! [You must be registered and logged in to see this link.] -->

<!-- Begin
message = 'Welcome to ThangBomBH Homepages !';
FonT = 'Verdana';
ColoR = '999999';
SizE = 3; //1 to 7 only!

var amount = 5, ypos =- 50, xpos = 0, Ay = 0, Ax = 0, By = 0, Bx = 0, Cy = 0, Cx = 0, Dy = 0, Dx = 0, Ey = 0, Ex = 0;
if (document.layers) {
for (i = 0; i < amount; i++) {
document.write('<layer name=nsl'+i+' top=0 left=0><font face='+FonT+' size='+SizE+' color='+ColoR+'>'+message+'</font></layer>');
}
window.captureEvents(Event.MOUSEMOVE);
function nsmouse(evnt) {
xpos = evnt.pageX + 20;
ypos = evnt.pageY + 20;
}
window.onMouseMove = nsmouse;
}
else if (document.all) {
document.write("<div id='outer' style='position:absolute;top:0px;left:0px'>");
document.write("<div style='position:relative'>");
for (i = 0; i < amount; i++) {
document.write('<div id="text"'+i+' style=& quot;position:absolute;top:0px;left:0px;
width:400px;height:20px"><font face='+FonT+' size='+SizE+' color='+ColoR+'>'+message+'</font></div>')
}
document.write("</div>");
document.write("</div>");
function iemouse() {
ypos = event.y + 20;
xpos = event.x + 20;
}
window.document.onmousemove = iemouse;
}
function makefollow() {
if (document.layers) {
document.layers['nsl'+0].top = ay;
document.layers['nsl'+0].left = ax;
document.layers['nsl'+1].top = by;
document.layers['nsl'+1].left = bx;
document.layers['nsl'+2].top = cy;
document.layers['nsl'+2].left = cx;
document.layers['nsl'+3].top = Dy;
document.layers['nsl'+3].left = Dx;
document.layers['nsl'+4].top = Ey;
document.layers['nsl'+4].left = Ex;
}
else if (document.all) {
outer.style.pixelTop = document.body.scrollTop;
text[0].style.pixelTop = ay;
text[0].style.pixelLeft = ax;
text[1].style.pixelTop = by;
text[1].style.pixelLeft = bx;
text[2].style.pixelTop = cy;
text[2].style.pixelLeft = cx;
text[3].style.pixelTop = Dy;
text[3].style.pixelLeft = Dx;
text[4].style.pixelTop = Ey;
text[4].style.pixelLeft = Ex;
}
}
function move() {
ey = Ey += (ypos - Ey) * 0.2;
ex = Ex += (xpos - Ex) * 0.2;
dy = Dy += (ey - Dy) * 0.3;
dx = Dx += (ex - Dx) * 0.3;
cy = Cy += (dy - Cy) * 0.4;
cx = Cx += (dx - Cx) * 0.4;
by = By += (cy - By) * 0.5;
bx = Bx += (cx - Bx) * 0.5;
ay = Ay += (by - Ay) * 0.6;
ax = Ax += (bx - Ax) * 0.6;
makefollow();
setTimeout('move()', 10);
}
window.onload=move;
// End -->
</script>
<!-- Script Size: 2.91 KB -->
-------------------------------------
Chuỗi các ngôi sao bay theo Mouse
-------------------------------------

Chú ý : Cần ảnh 6 ngôi sao , đặt nó trong 1 thư mục có tên là Images, bên ngoài thư mục đó là trang web có chứa đoạn mã bên dưới

Code:
<HTML>

<HEAD>

<TITLE>Hieu u'ng JavaScript - Le Quang Anh Hu'ng</TITLE>

<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=x-user-defined">

<META content="Microsoft FrontPage 4.0" name=GENERATOR>

<META content="Le Quang Anh Hu'ng Homepage" name=Author>

<script language=JavaScript>

<!--Che dấu những trình duyệt mà không biết JavaScript (ở đây sử dụng câu lệnh If và else if)

var version = 0;

if (navigator.userAgent.indexOf("MSIE 4") != -1) version = 5;

else if (navigator.userAgent.indexOf("MSIE 3") != -1) version = 1;

else if (navigator.userAgent.indexOf("Mozilla/4") != -1) version = 4;

else if (navigator.userAgent.indexOf("Mozilla/4.5") != -1) version = 7;

else if (navigator.userAgent.indexOf("Mozilla/3") != -1) version = 3;

else if (navigator.userAgent.indexOf("Mozilla/2") != -1) version = 2;

else if (navigator.userAgent.indexOf("MSIE 4.5") != -1) version = 6;

else version = 8;

// -->

</SCRIPT>

<STYLE> <!-- Nơi đây dùng để tạo mẫu kích thước, vị trí cho Images(6 ngôi sao)--> #trailsprite1 {

HEIGHT: 10px; LEFT: 0px; POSITION: absolute; TOP: 1px; VISIBILITY: visible; WIDTH: 10px; Z-INDEX: 100

}

#trailsprite2 {

HEIGHT: 10px; LEFT: 0px; POSITION: absolute; TOP: 0px; VISIBILITY: visible; WIDTH: 10px; Z-INDEX: 10

}

#trailsprite3 {

HEIGHT: 10px; LEFT: 0px; POSITION: absolute; TOP: 0px; VISIBILITY: visible; WIDTH: 10px; Z-INDEX: 10

}

#trailsprite4 {

HEIGHT: 10px; LEFT: 0px; POSITION: absolute; TOP: 0px; VISIBILITY: visible; WIDTH: 10px; Z-INDEX: 10

}

#trailsprite5 {

HEIGHT: 10px; LEFT: 0px; POSITION: absolute; TOP: 0px; VISIBILITY: visible; WIDTH: 10px; Z-INDEX: 10

}

#trailsprite6 {

HEIGHT: 10px; LEFT: 0px; POSITION: absolute; TOP: 0px; VISIBILITY: visible; WIDTH: 10px; Z-INDEX: 10

}

</STYLE>

</HEAD>

<BODY bgColor=#000000> <!-- chỉ màu nền background color -->

<script language=JavaScript1.1>

if (version > 3) <!-- Nếu ver > 3 (JavaScript) khi đó sẽ xuất ra màn hình bức ảnh thứ 1 và thứ tự tiếp theo ứng với mỗi images bao gồm chiều cao, viền, tên, Id -->

document.write('<div id="trailSprite1"><img src="http://www.vn-zoom.com/images/trailgif1.gif"height="10"width="10"border="0"name= "trailSprite1img"></div><div id="trailSprite2"><img src="http://www.vn-zoom.com/images/trailgif2.gif"height="10"width="10"border="0"name= "trailSprite2img"></div><div id="trailSprite3"><img src="http://www.vn-zoom.com/images/trailgif3.gif"height="10"width="10"border="0"name= "trailSprite3img"></div><div id="trailSprite4"><img src="http://www.vn-zoom.com/images/trailgif4.gif"height="10"width="10"border="0"name= "trailSprite4img"></div><div id="trailSprite5"><img src="http://www.vn-zoom.com/images/trailgif5.gif"height="10"width="10"border="0"name= "trailSprite5img"></div><div id="trailSprite6"><img src="http://www.vn-zoom.com/images/trailgif6.gif"height="10"width="10"border="0"name= "trailSprite6img"></div>')

</SCRIPT>

<script language=JavaScript> <!-- Nơi dòng lệnh này hỗ trợ cho trình duyệt Netscape không có cũng chẳng sao -->

<!--

NS4 = (("Netscape"==navigator.appName) && ("4"<=parseInt(navigator.appVersion)))

window.name = "right" <!-- Bạn phải cẩn thận ngay chổ chữ "right" đây là chỗ nguy hiểm chết người nếu bạn không để ý frames của bạn sẽ sổ tầm bậy liền đó, chính vì vậy bạn ấn định để sổ frames tên gì thì phải đặt tên đó à nghe! -->

// -->

</SCRIPT>

<script language=Javascript1.1>

<!--

var isNS = (navigator.appName == "Netscape");

layerRef = (isNS) ? "document" : "document.all";

styleRef = (isNS) ? "" : ".style";

var queue = new Array();var NUM_OF_TRAIL_PARTS = 6

for (x=1; x < 7; x++)

{ ///////////////Image Preload

eval("trailSpriteFrame" + x + "=new Image(10,10);");

eval("trailSpriteFrame" + x + ".src='images/trailgif"+x+".gif';");

}////////////////////////////////////////////////Đối tượng vệt ngôi sao chạy theo mouse

function trailSpriteObj(anID)

{

this.trailSpriteID = "trailSprite" + anID; //Tùy đằng trước

this.imgRef = "trailSprite" + anID + "img"; //Chuyển tới tên những ngôi sau

this.currentFrame = 1; //nhìn thấy khung

this.animateTrailSprite = animateTrailSprite; //Khai báo phương pháp vòng lặp đối tượng

}

function animateTrailSprite()

{

if (this.currentFrame <7)

{// Nếu có hoạt cảnh (mà) những khung rời bỏ, thay đổi những ngôi sao kết cấu hiện thời

if (isNS)

{ //Phát hiện ra bộ duyệt và thực hiện sự chuyển đổi hình ảnh

eval("document['"+this.imgRef+"'].src=trailSpriteFrame" + this.currentFrame + ".src");

}

else

{

eval("document['"+this.imgRef+"'].src=trailSpriteFrame" + this.currentFrame + ".src");

}

this.currentFrame ++; //và tăng thêm hiện thời những đối tượng hình ảnh

}

else

{ //Khung hiện hành như vậy đạt đến giới hạn nó che dấu ngôi sao

eval(layerRef + '.' + this.trailSpriteID + styleRef + '.visibility="hidden"');

}

}/////////////////////////////////////////////////////////////////

function processAnim()

{

for(x=0; x < NUM_OF_TRAIL_PARTS; x++)

queue[x].animateTrailSprite();

}

function processMouse(e)

{

currentObj = shuffleQueue();

if (isNS)

{

eval("document." + currentObj + ".left=e.pageX-0;");

eval("document." + currentObj + ".top=e.pageY+5;");

}

else

{

eval("document.all." + currentObj + ".style.pixelLeft=event.clientX+document.body.scro llLeft-0;");

eval("document.all." + currentObj + ".style.pixelTop=event.clientY+document.body.scrol lTop+5;");

}

}

function shuffleQueue()

{

lastItemPos = queue.length - 1;

lastItem = queue[lastItemPos];

for (i = lastItemPos; i>0; i--)

queue[i] = queue[i-1];

queue[0] = lastItem;

queue[0].currentFrame = 1; //sự sắp đặt lại số thứ tự hình ảnh của những đối tượng & làm cho ngôi sao rõ ràng thêm

eval(layerRef + '.' + queue[0].trailSpriteID + styleRef + '.visibility="visible"');

return queue[0].trailSpriteID;

}

function init()

{

for(x=0; x<NUM_OF_TRAIL_PARTS; x++) //Sắp hàng đầy đủ vệt dài của đối tượng

queue[x] = new trailSpriteObj(x+1);

if (isNS)

{

document.captureEvents(Event.MOUSEMOVE);

}

document.onmousemove = processMouse;

setInterval("processAnim();",25);

}

if (version > 3)

window.onload = init;

// -->

</SCRIPT>

</body>

</html>
♥ Life Is For Sharing ♥
Trả Lời Với Trích Dẫn
Có 39 thành viên cảm ơn ongame cho bài viết này:
19-6 (12-12-2010), akido_jo (25-02-2009), AnLinhTu (19-03-2011), atuan1993 (12-04-2011), banbeo (02-12-2009), borntobemaster (28-11-2008), bound12 (31-01-2010), btapro (13-02-2010), chinhdang91 (30-06-2011), convoibungnho (20-06-2011), fex (23-11-2009), henry_1177 (15-04-2010), hungarirang (22-08-2008), kaka185 (31-05-2011), komaty (01-04-2011), LapisLazuli (12-04-2009), Lee_Min_Han (03-04-2009), luv_mit (21-09-2009), mchan004 (25-08-2008), minhquang_ns (30-11-2008), mycom (19-01-2011), nclinh90 (25-12-2008), ngocnhi.info (30-05-2011), nhocboysd (10-09-2011), orbatGTA (28-07-2009), phj4nh_pr0_9x (31-01-2011), quangthangvn (16-05-2011), quynhvantri (08-12-2010), seovn (27-08-2011), shakuranbo.linh (13-06-2009), sobebiobreak (23-08-2008), sonchien10 (28-02-2010), thaihoang1231 (26-07-2011), thanhcong7272 (17-12-2008), thatwhy2910 (05-10-2008), tienvipbecon (16-10-2009), toro_baby (12-08-2009), tranquangkhai98 (02-06-2011), vytngok1992 (22-02-2011)
21-08-2008 01:47 #2
ongame
Cống hiến cho [V-Z]

Tham gia
Sep 2007
Đến từ
♥この世の極楽♥
Bài
1.282
VZD
2
Cảm ơn
202
Điểm
4.250/607 bài viết


-------------------------------------
Tạo Một Trận Sao Rơi Bằng JavaScript
-------------------------------------

Các bạn hãy nhúng đoạn Java Script bên dưới vào trang web của bạn đồng thời kết hợp với 1 image. Mức độ tương thích trình duyệt rất tốt, nó có thể tương thích với cả 2 trình duyệt Internet Explorer & Netscape Navigator. Bạn hãy copy đoạn Java Script dán vào Notepad sau đó lưu lại thành file có đuôi .htm hoặc .html.

Các bạn lưu ý: Khi tạo 1 image này các bạn cần tạo image này càng nhẹ nhàng chừng nào thì bông tuyết gơi càng nhẹ nhàng và uyển chuyển chừng đó, image này phải đạt mức độ trong suốt, kích thước bức ảnh càng nhỏ thì càng đỡ phải che mất chữ của bạn
Code:
<html>

<head>

<title>Hieu Ung JavaScript Tuyet Dang Roi - Le Hu'ng Homepage</title>

</head>

<body>

<center>
<script LANGUAGE="JavaScript1.2">

<!-- Begin

var no = 25; // Số tuyết

var speed = 10; // Số càng nhỏ tuyết di chuyển(rơi) càng nhanh

var snowflake = "http://www.vn-zoom.com/images/idcs.gif"; // Nơi đây chèn hình bông tuyết

var ns4up = (document.layers) ? 1 : 0; // Bộ duyệt tìm nạp vào

var ie4up = (document.all) ? 1 : 0;

var dx, xp, yp; // tọa độ và những vị trí thay đổi

var am, stx, sty; // Độ rộng và những bước thay đổi

var i, doc_width = 800, doc_height = 600;

if (ns4up) {

doc_width = self.innerWidth;

doc_height = self.innerHeight;

} else if (ie4up) {

doc_width = document.body.clientWidth;

doc_height = document.body.clientHeight;

}

dx = new Array();

xp = new Array();

yp = new Array();

am = new Array();

stx = new Array();

sty = new Array();

for (i = 0; i < no; ++ i) {

dx[i] = 0; // những biến đổi toạ độ tập hợp

xp[i] = Math.random()*(doc_width-50); // tập hợp những thay đổi vị trí

yp[i] = Math.random()*doc_height;

am[i] = Math.random()*20; // tập hợp những thay đổi độ rộng

stx[i] = 0.02 + Math.random()/10; // tập hợp những thay đổi bước

sty[i] = 0.7 + Math.random(); //tập hợp những thay đổi bước

if (ns4up) { // những lớp tập hợp

if (i == 0) {

document.write("<layer name=\"dot"+ i +"\" left=\"15\" ");

document.write("top=\"15\" visibility=\"show\"><img src=\"");

document.write(snowflake + "\" border=\"0\"></layer>");

} else {

document.write("<layer name=\"dot"+ i +"\" left=\"15\" ");

document.write("top=\"15\" visibility=\"show\"><img src=\"");

document.write(snowflake + "\" border=\"0\"></layer>");

}

} else if (ie4up) {

if (i == 0) {

document.write("<div id=\"dot"+ i +"\" style=\"POSITION: ");

document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: ");

document.write("visible; TOP: 15px; LEFT: 15px;\"><img src=\"");

document.write(snowflake + "\" border=\"0\"></div>");

} else {

document.write("<div id=\"dot"+ i +"\" style=\"POSITION: ");

document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: ");

document.write("visible; TOP: 15px; LEFT: 15px;\"><img src=\"");

document.write(snowflake + "\" border=\"0\"></div>");

}

}

}

function snowNS() { // hàm Netscape hoạt cảnh chính

for (i = 0; i < no; ++ i) { // vòng lặp cho mỗi điểm

yp[i] += sty[i];

if (yp[i] > doc_height-50) {

xp[i] = Math.random()*(doc_width-am[i]-30);

yp[i] = 0;

stx[i] = 0.02 + Math.random()/10;

sty[i] = 0.7 + Math.random();

doc_width = self.innerWidth;

doc_height = self.innerHeight;

}

dx[i] += stx[i];

document.layers["dot"+i].top = yp[i];

document.layers["dot"+i].left = xp[i] + am[i]*Math.sin(dx[i]);

}

setTimeout("snowNS()", speed);

}

function snowIE() { // hàm IE hoạt cảnh chính

for (i = 0; i < no; ++ i) { // vòng lặp cho mỗi điểm

yp[i] += sty[i];

if (yp[i] > doc_height-50) {

xp[i] = Math.random()*(doc_width-am[i]-30);

yp[i] = 0;

stx[i] = 0.02 + Math.random()/10;

sty[i] = 0.7 + Math.random();

doc_width = document.body.clientWidth;

doc_height = document.body.clientHeight;

}

dx[i] += stx[i];

document.all["dot"+i].style.pixelTop = yp[i];

document.all["dot"+i].style.pixelLeft = xp[i] + am[i]*Math.sin(dx[i]);

}

setTimeout("snowIE()", speed);

}

if (ns4up) {

snowNS();

} else if (ie4up) {

snowIE();

}

// End -->

</script>
</body>

</html>
------------------------------
Banner tự động chạy
------------------------------

Code:
<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="http://www.vn-zoom.com/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("http://maiyeuem.li/","http://maiyeuem.li/","http://maiyeuem.li/","http://maiyeuem.li/");
var xsImgTexts = new Array(" "," "," ");
var xsImgSize = new Array(focus_width, focus_height);
//-->
</SCRIPT>

<SCRIPT language=javascript src="http://www.vn-zoom.com/images/banner.js" type=text/javascript></SCRIPT>

</td></tr></table>
</center>
</body>
</html>



ghi chú
1 các bạn nên thay đổi các size chiều cao x chiều rộng nếu có thể tùy ý các bạn
--------------------------------
Đặt bộ đếm trên trang Web
--------------------------------

Ngay khi đưa trang web đầu tiên của mình lên Internet, bạn đã muốn biết có bao nhiêu người sẽ đến đọc trang web đó.Cũng như bạn,tôi đã từng sử dụng khá nhiều những bộ đếm miễn phí.Nhưng rồi không bằng lòng với những gì được cho không, cộng với chút công sức tìm hiểu, tôi đã tìm ra các làm bộ đếm cho mình.
Vì bộ đếm này được biết bằng PHP nên điều kiện để bộ đếm hoạt động được là website của bạn phải hỗ trợ PHP.Nếu muốn lưu giữ website miễn phí thì đây là một số nhà cung cấp dịch vụ lưu website có hỗ trợ PHP: ,...
Sau đây là hướng dẫn nhanh để bạn có được bộ đếm trên trang web của mình.

Bước 1: Mở tệp web muốn đặt bộ đếm bằng một trình soạn thảo văn bản như Notepad, EditPlus, UltraEdit.Mã HTML trang web của bạn sẽ hiện lên trong trình soạn thảo.
Bước 2:TÌm đến bị trí bạn muốn hiện bộ đếm và dán đoạn mã PHP dưới đây vào:
<?
$CountFile = "index.log";
$CF = fopen ($CountFile,"r");
$Hits = fread ($CF, filesize($CountFile));
fclose ($CF);
$Hits ++;

$CF = fopen($CountFile,"w");
fwrite ($CF,$Hits);
fclose($CF);
echo($Hits);
?>

Bước 3:Lưu tệp.Nếu tệp có phần mở rộng là .html thì đổi tên sang .php. Ví dụ index.htm thì đổi thành index.php. Có vậy thì sever mới hiểu và thi hành đoạn mã để hiện bộ đếm.
Bước 4: Tạo một tệp văn bản có tên index.log để lưu giá trị đếm.Nội dung tệp này là một con số bất kỳ mà bạn muốn bắt đầu cho bộ đếm của mình (ta hãy bắt đầu bằng con số 0).Nhớ dừng thêm dấu cách, Enter hay một ký tự nào khác ngoài con số trên.
Bước 5:Upload tệp web chứa bộ đếm (index.php) và tệp index.log lên website của bạn và nhớ đặt thuộc tính cho tệp index.log là writable bằng lệnh chmod 777.
Bầy giờ, hãy đánh địa chỉ tệp web của mình trong trình duyệt, bạn sẽ thấy trang web hiện lên cùng với bộ đếm.Mỗi lần bạn nhấn nút Refresh thì bộ đếm lại tăng lên 1 đơn vị.
Nay ta hãy nhìn sâu vào đoạn mã PHP một chút .Nguyên lý chung của các bộ đếm là lưu giá trị đếm vào một tệp riêng, mỗi lần có người truy cập đến tệp web là sẽ đọc giá trị lưu trong tệp đếm, tăng thêm 1, ghi lại vào tệp đếm và hiện giá trị đó lên màn hình.
Trước hết ta cần cho chương trình biết giá trị đếm được lưu ở đâu hay nói cách khác, tên tệp lưu giá trị đếm là gì:
$CountFile = "index.log";

Dùng các hàm xử lý tệp do PHP cung cấp, ta lần lượt mở tệp ở chế độ đọc("r" có nghĩa là "reading") và gán con trỏ tệp cho biến $CF:
$CF = fopen($CountFile,"r");
đọc toàn bộ nọi dung tệp và lưu vào biến $Hits:
$Hits = fread ($CF, filesize($CountFile));
và đóng tệp lại sau khi đọc xong:
fclose ($CF);
Gia trị đếm hiện tại đã lưu ở biến $Hits, giờ ta tăng biến này thêm 1 để chỉ rằng đã có thêm một người nữa truy cập trang web:
$Hits++;
Các bước tiếp theo cũng tương tự như ở trên.Ta mở tệp ở chế độ ghi ("w" có nghĩa là "writing"),ghi lại biến $Hits(đã tăng thêm 1 so với trước) và đóng tệp sau khi ghi xong:
$CF = fopen($CountFile,"w");
fwrite ($CF,$Hits);
fclose($CF);

Việc cuối cùng là ta hiện giá trị đếm lên màn hình:
echo($Hits);

Giá trị đếm này hiện lên ở chế độ văn bản, sử dụng đúng loại font mà bạn đang dùng trong trang web.Nếu bạn muôn thay đổi kiểu chữ, cỡ chữ, màu sắc để làm nổi bật bộ đếm, bạn có thể sử dụng thẻ <FONT> trong mã HTML để làm điểu này
Bạn chắc cũng chưa thảo mãn với bộ đếm ở dạng văn bản mà muốn bộ đếm được thể hiện ở dạng đồ họa, giống như ở các trang web chuyên nghiệp khác.Việc này không khó.Bạn cần có thêm các tệp ảnh (dạng .gif hoặc .jpg) chứa các con số từ 0 đến 9. Bạn có thể tải về nhiều tệp ảnh với các hình dạng con số khác nhau tại Digitmania.Giả sử các tệp ảnh này có tên lần lượt là 0.gif, 1.gif,...9.gif - mỗi tệp tương ứng với một con số, và các tệp ảnh này đều lưu cũng thư mục với tệp index.php trên sever
Đoạn mã PHP trong tệp index.php sẽ như sau:

<?
$CountFile = "index.log";
$CF = fopen ($CountFile,"r");
$Hits = fread ($CF, filesize($CountFile));
fclose ($CF);
$Hits ++;

$CF = fopen($CountFile,"w");
fwrite ($CF,$Hits);
fclose($CF);
for($i= 0;$i < strlen($Hits);$i++)
{
$Digit = substr($Hits,$i,1);
echo"<IMG SRC=\"$Digit.gif\">";
}
?>

Bạn thấy là những dòng đầu hoàn toàn giống như trước. Sự khác nhau chỉ bắt đầu ở dong cuối cùng.Thay vì dòng lệnh echo($Hits); ta dùng vòng lặp for để lần lượt tạc từng con số trong giá trị đếm và lưu tạm vào một biện gọi là $Digit:
$Digit = substr ($Hits,$i,1);
Sau đó ta sẽ dùng thẻ <IMG> của HTML để chỉ ra các tệp ảnh nào ta muốn hiện tương ứng với từng còn số trong giá trị đếm:
echo"<IMG SRC=\"$Digit.gif\">";
Ví dụ giá trị đếm lưu trong biến $Hits là 865.Giá trị này gồm 3 chữ số nên vòng lặp for sẽ được thực hiện 3 lần. Tại lần thứ nhất, biến $Digit sẽ được gán với con số thứ nhất, tức là 8.Lần thứ hai và thứ ba,biến $Digit sẽ lần lượt nhận giá trị 6 và 5.Kết quá là trang web index.php khi xuất hiện trong trình duyệt của người dùng sẽ có mã HTML thực tế là:
<IMG SRC="8.gif"><IMG SRC="6.gif"><IMG SRC="5.gif">
và trình duyệt sẽ hiện lên 3 tệp ảnh tương ứng với các con số 8,6,5, tạo thành một dãy số hoàn chỉnh là số lần trang web đã được truy cập
-----------------------------------------
Cách Add bộ gõ tiếng việt vào 4rum
-----------------------------------------

Vào Admin Control Panel >> Styles & Templates >> Search in Templates >> Chọn Style đang dùng >> Search
for Text >> Đánh vào từ khóa: footer >> Double click vào footer >> kéo xuống cuối cùng của Template này và copy đoạn code sau dán vào

Code:
<script language="javascript1.2" type="text/javascript" src="him.js"></script>
- Tiếp tục vào VBulletin Options >> Censorship Options >> Edit Options >> Blank Character Stripper >> Xóa hết dãy số và kí tự trong ô này đi.
- Thế là xong phần bộ gõ cho Diễn Đàn rồi đó
+ Nhúng vào Admin Control Panel:
- Tiếp tục upload file him.js vào thư mục clientscript (hoặc chỉ đường dẫn chính xác trong đoạn code bên dưới).

- Open file adminfuntions.php tìm đoạn:
/**
* Prints the page footer, finishes Gzip encoding and terminates execution
*/
function print_cp_footer()
{
Thêm vào bên dưới:

Code:
// Begin HIM Editor for Admin Control Panel
echo("<script language='javascript1.2' src=\"../clientscript/him.js\"></script>");
// End HIM Editor for Admin Control Panel
(Chú ý là nếu bạn ko muốn upload file him.js vào thư mục clientscript thì phải chọn đường dẫn chính xác để gọi file him.js ở đây đường dẫn sẽ là: src=\"../him.js\" )
- Save file adminfuntions.php và upload lại lên host.
Kết thúc phần nhúng bộ gõ.

------------------------------------------------------------
CoDe Click Vào Link Và Đặt Web Bạn Làm Trang Chủ Trên IE
------------------------------------------------------------

Code:
<a target="blank" <a style="text-decoration: none; " onclick="this.style.behavior='url(#default#homepag e)'; this.setHomePage('http://kyniemb2.InFo');" href="http://Link Web Cua Bạn ">
------------------------------
Code Ko Cho Save Web
------------------------------

Code:
<NOSCRIPT><IFRAME SRC=*.jpg></IFRAME></NOSCRIPT>
-------------------------------------
Code khi tắt web thì hiện thông báo
-------------------------------------

[code]
<html>
<head>
<title> Bom Pr0 </title>
<meta Name="GENERATOR" content="Microsoft FrontPage 5.0">
</head>
<body onunload="window.alert(' Đồng Bào Chú Ý ...- Click [You must be registered and logged in to see this link.] !')">
</body>
</html>

-------------------------------------
Code Danh Mục tìm kiếm = Google
-------------------------------------

Code:
<!-- Search Google -->
<center>
<form method="get" action="http://www.google.com.vn/custom" target="_top">
<td nowrap="nowrap" valign="top" align="left" height="32">
<a href="http://www.google.com/">
<img src="http://www.google.com/logos/Logo_25wht.gif" border="0" alt="Google" align="middle" width="75" height="32"></img></a>
<input type="text" name="q" size="50" maxlength="255" value=""></input>
<input type="submit" name="sa" value="Search"></input>
<input type="hidden" name="client" value="pub-1710694852538675"></input>
<input type="hidden" name="forid" value="1"></input>
<input type="hidden" name="ie" value="UTF-8"></input>
<input type="hidden" name="oe" value="UTF-8"></input>
<input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH :center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000F F;T:000000;GFNT:0000FF;GIMP:0000FF;FORID:1;"></input>
<input type="hidden" name="hl" value="vi"></input>
</td></tr>
</form>
</center>
<!-- Search Google -->
Các link dowwn tài liệu :

* (1) So tay lam Forum 1.0.rar

*(2) giao trinh thiet ke web.ZIP

*(3) huong dan xay dung website.rar

Tập hợp hơn 4000 file flash động để làm web

4000 Professional flash Web Animations Bạn có thể dùng những file flash có sẵn này làm mẫu hay đưa vào Web. Ngoài ra có thể dùng với mục đích học tập



Pass:
Thay đổi nội dung bởi ongame; 21-08-2008 lúc 01:49.
♥ Life Is For Sharing ♥
Trả Lời Với Trích Dẫn
Có 47 thành viên cảm ơn ongame cho bài viết này:
01683781691 (19-04-2009), 19-6 (12-12-2010), akido_jo (13-01-2010), AnLinhTu (19-03-2011), banbeo (02-12-2009), blackwolf1986 (09-04-2009), bluesea.bk (06-12-2008), borntobemaster (28-11-2008), bound12 (31-01-2010), caothean (11-12-2008), dizzmylife1 (23-12-2008), dragonkinglove (30-04-2011), fex (23-11-2009), henry_1177 (15-04-2010), hiep2000 (14-12-2008), hipzols (07-05-2009), hongquan_88 (06-10-2008), huuthitv03 (28-01-2009), kaka185 (31-05-2011), LapisLazuli (12-04-2009), Lee_Min_Han (03-04-2009), lehai112233 (15-09-2010), luv_mit (22-09-2009), mchan004 (25-08-2008), minhkai (21-06-2011), minhquang_ns (30-11-2008), nangchieu988 (14-02-2011), nguoikeugoi (19-10-2009), nguoiyeudau3003 (23-11-2008), nguyenphugia2009 (12-09-2010), nguyentrungtin067 (21-12-2008), nh0ck0n10B (14-12-2008), nhocboysd (10-09-2011), OliverTime (30-05-2011), phj4nh_pr0_9x (31-01-2011), prolangtu (05-10-2008), provn92 (07-08-2010), shakuranbo.linh (13-06-2009), thatwhy2910 (05-10-2008), theanh1234567 (18-03-2010), tranquangkhai98 (02-06-2011), truongan211 (31-05-2011), tuananh02i (05-01-2009), tu_lieu_8e (18-06-2011), Vnairlines (01-10-2008), Vũ Nhất Hồ (06-01-2011), zorangez (19-10-2009)
06-10-2008 19:03 #3
mchan004
Thành viên đang bị kỷ luật

Tham gia
May 2008
Đến từ
HCM
Bài
1.596
VZD
314
Cảm ơn
105
Điểm
541/231 bài viết


bây giờ website toàn mã nguồn mở chèn vô đâu giờ
joomla thì chèn vào index của template
Thay đổi nội dung bởi mchan004; 14-06-2011 lúc 15:23.
Trả Lời Với Trích Dẫn
Có 3 thành viên cảm ơn mchan004 cho bài viết này:
boyzmen (15-10-2008), huuthitv03 (28-01-2009), shakuranbo.linh (03-11-2009)
18-12-2008 10:02 #4
htcv9
Gà Con

Tham gia
Aug 2008
Bài
6
VZD
2
Cảm ơn
16
Điểm
0/0 bài viết

cho mình hỏi code phóng to hình giống như cái nầy na`
cảm ơn pác pro nhiều!



viết bài phải có dấu!
Thay đổi nội dung bởi nguyentrungtin067; 21-12-2008 lúc 18:19.
Trả Lời Với Trích Dẫn
22-12-2008 15:25 #5
dizzmylife1
Rìu Bạc

Tham gia
Jun 2008
Đến từ
Bà rịa
Bài
228
VZD
4
Cảm ơn
80
Điểm
530/135 bài viết


ANh có cái code nào mà làm thành một cuộn nhạc khi vào trang chủ hok ?
Sẵn chỉ em cách up nhạc cách làm luôn càng tốt!

Cộng đồng Nko-Clan đã mở cửa lại. Mong các bạn cũng tham gia nhé!

Forum sẽ mở cửa từ 9h trở đi
Trả Lời Với Trích Dẫn
Thành viên đã cảm ơn bài viết này của dizzmylife1:
theanh1234567 (18-03-2010)
20-02-2009 10:03 #6
Mr.Quyetnm
Gà Con

Tham gia
Feb 2009
Bài
2
VZD
0
Cảm ơn
0
Điểm
6/2 bài viết

Tạo giờ theo từng địa điểm.

<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1256">
<title>New Page 2</title>
</head>

<body>

<table border="0" width="200" cellspacing="0" cellpadding="3">
<form name="where">
<tr>
<td width="100%">
<select name="city" size="1" onchange="updateclock(this);">
<option value="" selected>Local time</option>
<option value="0">London GMT</option>
<option value="1">Rome</option>
<option value="7">Bangkok</option>
<option value="8">Hong Kong</option>
<option value="9">Tokyo</option>
<option value="10">Sydney</option>
<option value="12">Fiji</option>
<option value="-10">Hawaii</option>
<option value="-8">San Francisco</option>
<option value="-5">New York</option>
<option value="-3">Buenos Aires</option>
</select>

</td>
</tr>
<tr>
<td width="100%">
<script language="JavaScript">

/*
Drop Down World Clock
This credit notice must stay intact
*/

if (document.all||document.getElementById)
document.write('<span id="worldclock" style="font:bold 16px Arial;"></span><br>')

zone=0;
isitlocal=true;
ampm='';

function updateclock(z){
zone=z.options[z.selectedIndex].value;
isitlocal=(z.options[0].selected)?true:false;
}

function WorldClock(){
now=new Date();
ofst=now.getTimezoneOffset()/60;
secs=now.getSeconds();
sec=-1.57+Math.PI*secs/30;
mins=now.getMinutes();
min=-1.57+Math.PI*mins/30;
hr=(isitlocal)?now.getHours()now.getHours() + parseInt(ofst)) + parseInt(zone);
hrs=-1.575+Math.PI*hr/6+Math.PI*parseInt(now.getMinutes())/360;
if (hr < 0) hr+=24;
if (hr > 23) hr-=24;
ampm = (hr > 11)?"PM":"AM";
statusampm = ampm.toLowerCase();

hr2 = hr;
if (hr2 == 0) hr2=12;
(hr2 < 13)?hr2:hr2 %= 12;
if (hr2<10) hr2="0"+hr2

var finaltime=hr2+':'+((mins < 10)?"0"+mins:mins)+':'+((secs < 10)?"0"+secs:secs)+' '+statusampm;
if (document.all)
worldclock.innerHTML=finaltime
else if (document.getElementById)
document.getElementById("worldclock").innerHTML=fi naltime
else if (document.layers){
document.worldclockns.document.worldclockns2.docum ent.write(finaltime)
document.worldclockns.document.worldclockns2.docum ent.close()
}


setTimeout('WorldClock()',1000);
}

window.onload=WorldClock
//-->
</script>

<!--Place holder for NS4 only-->
<ilayer id="worldclockns" width=100% height=35><layer id="worldclockns2" width=100% height=35 left=0 top=0 style="font:bold 16px Arial;"></layer></ilayer>

<p>

<font face="arial" size="-2">This free script provided by
<a href="http://www.javascriptfreecode.com/">java site</a></font>
</td>
</form>
</tr>
</table>

</body>

</html>
Thay đổi nội dung bởi Mr.Quyetnm; 20-02-2009 lúc 10:05. Lý do: sai thông tin
Trả Lời Với Trích Dẫn
Thành viên đã cảm ơn bài viết này của Mr.Quyetnm:
theanh1234567 (18-03-2010)
20-02-2009 10:12 #7
Mr.Quyetnm
Gà Con

Tham gia
Feb 2009
Bài
2
VZD
0
Cảm ơn
0
Điểm
6/2 bài viết
Một Calendar đẹp
1. Put the code into the BODY of your HTML document -->
<!-- STEP ONE: Copy this code into the HEAD your HTML document -->
<html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
</head>

<body>

<center>
<script LANGUAGE="JavaScript">

<!-- Begin
monthnames = new Array(
"January",
"Februrary",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"Decemeber");
var linkcount=0;
function addlink(month, day, href) {
var entry = new Array(3);
entry[0] = month;
entry[1] = day;
entry[2] = href;
this[linkcount++] = entry;
}
Array.prototype.addlink = addlink;
linkdays = new Array();
monthdays = new Array(12);
monthdays[0]=31;
monthdays[1]=28;
monthdays[2]=31;
monthdays[3]=30;
monthdays[4]=31;
monthdays[5]=30;
monthdays[6]=31;
monthdays[7]=31;
monthdays[8]=30;
monthdays[9]=31;
monthdays[10]=30;
monthdays[11]=31;
todayDate=new Date();
thisday=todayDate.getDay();
thismonth=todayDate.getMonth();
thisdate=todayDate.getDate();
thisyear=todayDate.getYear();
thisyear = thisyear % 100;
thisyear = ((thisyear < 50) ? (2000 + thisyear) : (1900 + thisyear));
if (((thisyear % 4 == 0)
&& !(thisyear % 100 == 0))
||(thisyear % 400 == 0)) monthdays[1]++;
startspaces=thisdate;
while (startspaces > 7) startspaces-=7;
startspaces = thisday - startspaces + 1;
if (startspaces < 0) startspaces+=7;
document.write("<table border=2 bgcolor=white ");
document.write("bordercolor=black><font color=black>");
document.write("<tr><td colspan=7><center><strong>"
+ monthnames[thismonth] + " " + thisyear
+ "</strong></center></font></td></tr>");
document.write("<tr>");
document.write("<td align=center>Su</td>");
document.write("<td align=center>M</td>");
document.write("<td align=center>Tu</td>");
document.write("<td align=center>W</td>");
document.write("<td align=center>Th</td>");
document.write("<td align=center>F</td>");
document.write("<td align=center>Sa</td>");
document.write("</tr>");
document.write("<tr>");
for (s=0;s<startspaces;s++) {
document.write("<td> </td>");
}
count=1;
while (count <= monthdays[thismonth]) {
for (b = startspaces;b<7;b++) {
linktrue=false;
document.write("<td>");
for (c=0;c<linkdays.length;c++) {
if (linkdays[c] != null) {
if ((linkdays[c][0]==thismonth + 1) && (linkdays[c][1]==count)) {
document.write("<a href=\"" + linkdays[c][2] + "\">");
linktrue=true;
}
}
}
if (count==thisdate) {
document.write("<font color='FF0000'><strong>");
}
if (count <= monthdays[thismonth]) {
document.write(count);
}
else {
document.write(" ");
}
if (count==thisdate) {
document.write("</strong></font>");
}
if (linktrue)
document.write("</a>");
document.write("</td>");
count++;
}
document.write("</tr>");
document.write("<tr>");
startspaces=0;
}
document.write("</table></p>");
// End -->
</script>
</center>
<!-- Script Size: 2.98 KB -->

</body>

</html>

<!-- END CODE-->

Về Đầu Trang Go down
https://itvui.123.st
 
Link đổi màu tự động
Về Đầu Trang 
Trang 1 trong tổng số 1 trang
 Similar topics
-
» click 1 link mà ra tới 3 window (dùng để quảng cáo bằng link)
» [Code] Share link bài viết (rất hay)
» Ảnh nền khi rê chuột vào link chữ
» Forumotion Pro Link
» [Q&A]Xin hiệu ứng link forum

Permissions in this forum:Bạn không có quyền trả lời bài viết
Kênh thông tin giải trí dành cho teen việt :: *`+`* Mã Nguồn *`+`* :: Thủ Thuật Forumotion :: Code-
Chuyển đến