Laola - HTML-Quelltext

Quelltext von laola.html

Dies ist die Auflistung der Datei laola.html.

Im folgenden Quelltext sind wichtige Bereiche rot und Kommentare grün markiert.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<meta http-equiv="content-language" content="en">
<meta http-equiv="content-script-type" content="text/javascript">
<meta http-equiv="content-style-type" content="text/css">
<meta name="author" content="Ulrich Kritzner">
<meta name="robots" content="none">
<title>JavaScript - DivContent - Demo</title>

<script type="text/javascript" src="divcontent.js"></script>

<script type="text/javascript">
<!--
var DDC;
/* Zaehler und Gesamtanzahl der Schritte: */
var j=0;count=12;
/* Liste aller zu verwendenden Size-Attribute: */
var sizes=new Array("30px","28px","26px","24px","22px","20px",
                    "21px","23px","25px","27px","29px","31px");
/* Liste der hellen Vordergrundfarben: */
var fgcol=new Array("#FF8080","#FFC080","#FFFF80","#C0FF80",
                    "#80FF80","#80FFC0","#80FFFF","#80C0FF",
		    "#8080FF","#C080FF","#FF80FF","#FF80C0");
/* Liste der dunkleren Hintergrundfarben: */
var bgcol=new Array("#800000","#804000","#808000","#408000",
                    "#008000","#008040","#008080","#004080",
		    "#000080","#400080","#800080","#800040");
/* Starttags: */
var starttext="<table border=\"0\" cellpadding=\"10\" cellspacing=\"0\" width=\"100%\">";
starttext+="<tr><td align=center style=\"background:#000000\">";
/* mein Text: */
var mytext="Dieser Text macht eine Laola-Welle";
/* Endtags: */
var endtext="</td></tr></table>";

/* Inhaltsbehandler: */
function MyHandler()
{
  var i,k,text="";
  var sizenum,fgnum,bgnum;
  for (i=0;i<mytext.length;i++)
  {
    k=i+count-j;
    while (k>=count)
      k-=count;
    text+="<b style=\""
    text+="font-size:"+sizes[k]+"; ";
    text+="color:"+fgcol[k]+"; ";
    text+="background-color:"+bgcol[k]+"\">";
    if (mytext.charCodeAt(i)>32)
      text+=mytext.charAt(i);
    else
      text+="&nbsp";
    text+="</b>";
  }
  j++;
  if (j>=count)
    j=0;
  return starttext+text+endtext;
}

/* Initialisierung: */
function Init()
{
  DDC=new DivContent("DDC","section1");
  DDC.SetContentHandler(MyHandler);
  DDC.Run(200);
}
//-->
</script>

</head>

<body onLoad="Init();">

<h4 align=center>Demo zur Verwendung von "divcontent.js"</h4>
<p align=center>
(c) 2002 <a href="../../tohome.html">Ulrich Kritzner</a>
<br>
die Verwendung von "divcontent.js" in kommerziellen Seiten ist kostenpflichtig
<br>
<a href="index.html">zur&uuml;ck zum Index</a>
</p>
<br>

<div name="section1" id="section1" align=center>
<b><tt style="color:#800000; background-color:#F0F0A0">
JavaScript angeschaltet?
</tt></b>
</div>

</body>
</html>
Autor: Ulrich Kritzner