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