<i><center>
<script type="text/javascript">
//store the quotations in arrays
quotes = new Array(6);
quotes[0] = "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.";
quotes[1] = "Use the best: Linux for servers, Mac for graphics, Windows for Solitaire.";
quotes[2] = "Stet clita kasd gubergren, no sea takimata.";
quotes[3] = "Duis autem vel eum iriure dolor in hendrerit.";
quotes[4] = "Nam liber tempor cum soluta nobis eleifend.";
quotes[5] = "At vero eos et accusam et justo duo dolores et ea rebum.";
//calculate a random index
index = Math.floor(Math.random() * quotes.length);
//display the quotation
document.write("\n");
document.write(quotes[index]);
//done
</script>
</center></i>
Perhatikan pada kode script yg diberi warna merah? Jika ingin menambahkan kata-katanya harap itu juga diganti dan ini kode script yg ditulisnya...<script type="text/javascript">
//store the quotations in arrays
quotes = new Array(6);
quotes[0] = "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.";
quotes[1] = "Use the best: Linux for servers, Mac for graphics, Windows for Solitaire.";
quotes[2] = "Stet clita kasd gubergren, no sea takimata.";
quotes[3] = "Duis autem vel eum iriure dolor in hendrerit.";
quotes[4] = "Nam liber tempor cum soluta nobis eleifend.";
quotes[5] = "At vero eos et accusam et justo duo dolores et ea rebum.";
//calculate a random index
index = Math.floor(Math.random() * quotes.length);
//display the quotation
document.write("\n");
document.write(quotes[index]);
//done
</script>
</center></i>
quotes[NEXT-NUMBERS] = "blah-bleh-bloh-dut-pret.";
Bagaimana dengan gambar pada header jika memang bisa!!!
Trik ini Beben dapatkan dari http://freeyasoul.blogspot.com Jika ingin melakukan trik ini, sobat harus membuat gambar yg sesuai dengan lebar dan tinggi header/top sobat. Heres of the script...
<script type="text/javascript">
var banner= new Array()
banner[0]="http://link-gambar.jpg"
banner[1]="http://link-gambar.jpg"
banner[2]="http://link-gambar.jpg"
banner[3]="http://link-gambar.jpg"
banner[4]="http://link-gambar.jpg"
var random=Math.round(4*Math.random());
document.write("<style>");
document.write("#UniqueID {");
document.write(' background:url("' + banner[random] + '") no-repeat left TOP;');
document.write(" }");
document.write("</style>");
</script>
Letakkan script tersebut setelah kode <body> Jika mau menambahkan gambar kodenyavar banner= new Array()
banner[0]="http://link-gambar.jpg"
banner[1]="http://link-gambar.jpg"
banner[2]="http://link-gambar.jpg"
banner[3]="http://link-gambar.jpg"
banner[4]="http://link-gambar.jpg"
var random=Math.round(4*Math.random());
document.write("<style>");
document.write("#UniqueID {");
document.write(' background:url("' + banner[random] + '") no-repeat left TOP;');
document.write(" }");
document.write("</style>");
</script>
banner[NEXT-NUMBER]="http://link-gambar.jpg"
dan perhatikan pada script pada bagian angka yg diberi warna merah!!! Perhatikan juga pd script yg diberi warna kuning UniqueID!!! Gantilah dengan ID yg ada pada template sobat. Biasanya sih bisa header, top, atau apapun.
Beres kalimat dan gambar yg bisa berubah-rubah saat reload, saatnya masuk pada sesi selanjutnya. Kalau menurut blog ini, keterangan (option) pada header bisa dirubha-rubah juga sob ;)) Kalau memang berminat silahkan deh sob Blog Immeria. Untuk yg ini Beben gak bisa coba, soalnya aku sudah ngilangin option pada headernya sob =)) ya ke sumbernya aja deh yah :D
Random Background Image for Body
Wassalam...:)<script type="text/javascript">
//<![CDATA[
var banner= new Array()
banner[0]="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVAWIFkXRzPL-ah1wwOmCdLYz4LR-H06LPFNI0ZFXoWGCzykKeTGre0vpdIQGJNJaXG5uI5FSoa4sskZHfllhvMCy10GpqXOapQxrAjcHECzpOsochhFqEdaO8QDewZ6PQxE1YHU5ZmuM/"
banner[1]="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXFTQZZ8u3lPAagHbDFAWchveqUOq-wzW7CQ2tv5u-bel0LSWHmm23iVh0n9nbshpU4XYNaqqOJ8OrSNWCSUai0UsNKYEwFeIU_eMUuqMT_ZMhyVa-weIqbVbi0skELxgjQk2CkgdG0HE/"
banner[2]="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitiXJeuiWjWztgE8h9s6poSgqFTrnG8LM5OsKOrqeO7BJLjeRm_kdckhL3yynoNuMSODlRjWgi17MrRwFSjj7LusfOWgUg5k06sSO0qbEG_aZQpSxoB2UW_eJ5sBBt5ecMzdojUeeJQNA/"
banner[3]="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj54mprm5lDgN3AlgXYvwl0v2RQtG-EGBD-1Hql8cQAfebRwEpTVRW8TC8ZjDvceCRGFF8s4g4ZG3FSBKcvGnZKwps7ed0JbE2UEeLqgdAkp-64elx4sQ5z_fL2-t6MF6FMqtoRoziNemk/"
banner[4]="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJ9Lf2oD9BSlU69tFd47IxCi2MOlT8CNmSVtA49sqstiqRaAYqot6kaANGPGR5deaNBlyw72dTOJn4Brf2Mzbgz9H_cLdKZJMAgiNeJA87O9HEMs6gXbyJxRA2mRhAHaOVaRXFkqAcqS4/"
banner[5]="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5iN2paChQRQtmea7jSLXnua7qEJeCoVx8YaODoswh-G1dYVSE3rptoTskq9U2ywWe2sIilEGvK4OFztrMSSZfLHuSwpbxvSurnS8ofUM8rSFDqKnaHnMNH4qttLzhKSFlLurUZsUxquI/++Pearce.jpg"
banner[6]="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4z__6W0_FwyXqznqaF5lDLENB18td93NkDkYmCLrI_cYZZMdfGoPDJHg59MHfUFaTGknpDR0Br56yMnFeK828ig8loaKRcUNXqNl5vWSEywRWkbGWzRYuTSh2lj04AHZa2q51k_aLbd9A/s1600/nurul%252Bsyuhada%252Bseksi.jpg"
banner[7]="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVAWIFkXRzPL-ah1wwOmCdLYz4LR-H06LPFNI0ZFXoWGCzykKeTGre0vpdIQGJNJaXG5uI5FSoa4sskZHfllhvMCy10GpqXOapQxrAjcHECzpOsochhFqEdaO8QDewZ6PQxE1YHU5ZmuM/"
banner[8]="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXFTQZZ8u3lPAagHbDFAWchveqUOq-wzW7CQ2tv5u-bel0LSWHmm23iVh0n9nbshpU4XYNaqqOJ8OrSNWCSUai0UsNKYEwFeIU_eMUuqMT_ZMhyVa-weIqbVbi0skELxgjQk2CkgdG0HE/"
banner[9]="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2NC-tcoYSe_EdOAC5MvA3FUaR0l8a-6hlbngeiFsm10GgR8xAlSr80oV_dLYyikHnUZD9fEHuqa5bQGvhdpNJ1kwaB5uBuExMgr55kZwD6lgWLEvdlexf2NyuqJ1IIkCOXlBA_dv3z3E/"
var random=Math.floor(10*Math.random());
document.write("<style>");
document.write("body {");
document.write('background:#f4f4f4 url("' + banner[random] + '") repeat left top;');
document.write(" }");
document.write("</style>");
//]]>
</script>
Tidak ada komentar:
Posting Komentar