test

Membuat Scrolling Text Dalam Status Bar  

Posted by Unknown in


Jika ingin membuat teks yang berjalan berputar di status bar pada saat orang lain mengunjungi website yang Anda buat, silahkan copy dan paste kode java script dibawah ini. Anda dapat mengubah var m1 sampai var m4 sesuai dengan keinginan Anda.





<!– Copy kode ini dan paste dalam tag HEAD –>

<SCRIPT LANGUAGE=”JavaScript”>

<!– Begin

function scrollit(seed) {

var m1 = “Selamat Datang di Website Saya“;

var m2 = “….. Silahkan baca dan“;

var m3 = “….. Nikmati! “;

var m4 = “….. Kembalilah kesini lain kali! “;

var msg=m1+m2+m3+m4;

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);

}

}


}

// End –>

</SCRIPT>


<!– Tambahkan kode ini kedalam tag BODY –>

<BODY onLoad=”scrollit(100)”>

<!– Script Done –>





Selamat mencoba! :)




This entry was posted on Thursday, November 06, 2008 at 11:50 AM and is filed under . You can follow any responses to this entry through the comments feed .

0 comments

Post a Comment