top of page

 

<html>

<HEAD>

<SCRIPT LANGUAGE="JavaScript">

 

var theText = new Array()

theText[0] = "Test 1"

theText[1] = "Test 2"

theText[2] = "Test 3"

theText[3] = "Test 4"

 

var p = theText.length;

var whichText = Math.round(Math.random()*(p-1));

 

function showText()

{

      document.write(theText[whichText]);

}

</script>

</HEAD>

 

<BODY>

<SCRIPT LANGUAGE="JavaScript">

       showText();

</script>

 

</BODY>

</html>

HTML - Javascript Quellcode für die Ausgabe von Zufallstext

bottom of page