Chữ chạy trên thanh trạng thái của trình duyệtCó nhiều chiêu trên thanh trạng thái của trình duyệt, kỳ này xin giới thiệu cùng các bạn “dòng chữ chạy trên thanh trạng thái”.. Bạn chỉ cầ
Trang 1Chữ chạy trên thanh trạng thái của trình duyệt
Có nhiều chiêu trên thanh trạng thái của trình duyệt, kỳ này xin giới thiệu cùng các bạn
“dòng chữ chạy trên thanh trạng thái” Bạn chỉ cần “dán” đoạn mã JavaScript này vào trang Web của mình, nếu cần bạn thay đổi nội dung dòng chữ cho phù hợp Chúc bạn thành công
<BODY onload="scrollit(100)">
<p><br>
<script>
<! function scrollit(seed) {
var msg = "Chao mung ban den voi tuan tin conghung.com";
var out = " ";
var c = 1;
if (seed > 100) {
seed ;
cmd="scrollit("+seed+")";
timerTwo=window.setTimeout(cmd,100);
}
else if (seed <= 100 && seed > 0) {
for (c=0; c < seed; c++) {
out+=" ";
}
out+=msg;
seed ;
window.status=out;
cmd="scrollit("+seed+")";
timerTwo=window.setTimeout(cmd,100);
}
else if (seed <= 0) {
if (-seed < msg.length) {
out+=msg.substring(-seed,msg.length);
seed ;
window.status=out;
cmd="scrollit("+seed+")";
timerTwo=window.setTimeout(cmd,100);
}
else {
window.status=" ";
timerTwo=window.setTimeout("scrollit(100)",75);
}
}
}
// >
</SCRIPT>