scriptwelt.org das JavaScript Archiv

Navigation
Startseite
Audio & Sound
Formulare
Cookies
Fenster & Frame
Grafik & Text
Navigation
Suche Scripts
Fun und Spiele
Buttons
Diverse
Tutorials

Kontakt
eine Mail an ScriptWelt.org
Webhosting
Tipps zur Providerwahl und zum Webspace

JavaScript in eine HTML Datei einbinden

Sind JavaScripts sicher?

Links zum Thema JavaSript

Impressum
impressum

Cookie JavaScript / Random Text

Das JavaScript zeigt beim Aufruf der Seite immer einen anderen Text random an.
Autor: cgiscript
zur Demo

in <head> einfügen

<SCRIPT LANGUAGE="Javascript"><!--

// ***********************************************
// AUTHOR: CGISCRIPT.NET, LLC
// URL: cgiscript.net
// Use the script, just leave this message intact.
// Download your FREE CGI/Perl Scripts today!
// cgiscript.net/scripts.htm )
// ***********************************************

function text() {
};

text = new text();
number = 0;

// textArray
text[number++] = "Random text 1."
text[number++] = "Random text 2."
text[number++] = "Random text 3."
text[number++] = "Random text 4."
text[number++] = "Random text 5."
// keep adding items here...

increment = Math.floor(Math.random() * number);

document.write(text[increment]);

//--></SCRIPT>