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

Grafik & Text JavaScript /Text - Lupe

Mit diesen JavaSctipt kann man einen Text, wie durch eine Lupe betrachten.
Autor: unbekannt
zur Demo

in <head> einfügen

<style type="text/css">
span {font-size: x-small}
</style>

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin
function convertPreBlocks() {}
var regular = "x-small";
function bigger(thing){
thing.style.fontSize = "large";
siblingElement = thing.previousSibling;
while(siblingElement) {
if(siblingElement.tagName=="SPAN") {
siblingElement.style.fontSize = "medium";
break;
}
siblingElement = siblingElement.previousSibling;
}
siblingElement = thing.nextSibling;
while(siblingElement) {
if(siblingElement.tagName=="SPAN") {
siblingElement.style.fontSize = "medium";
break;
}
siblingElement = siblingElement.nextSibling;
}
}
function normal(thing){
thing.style.fontSize = regular;
siblingElement = thing.previousSibling;
while(siblingElement) {
if(siblingElement.tagName=="SPAN") {
siblingElement.style.fontSize = regular;
break;
}
siblingElement = siblingElement.previousSibling;
}
siblingElement = thing.nextSibling;
while(siblingElement) {
if(siblingElement.tagName=="SPAN") {
siblingElement.style.fontSize = regular;
break;
}
siblingElement = siblingElement.nextSibling;
}
}
// End -->
</script>

in <body> einfügen

<span onmouseover="bigger(this)" onmouseout="normal(this)">Manchmal gibt kliene Schrift</span><br>
<span onmouseover="bigger(this)" onmouseout="normal(this)">mit so einer Lupe</span><br>
<span onmouseover="bigger(this)" onmouseout="normal(this)">einen tollen</span><br>
<span onmouseover="bigger(this)" onmouseout="normal(this)">Effekt!</span><br>
<span onmouseover="bigger(this)" onmouseout="normal(this)">nicht immer</span><br>
<span onmouseover="bigger(this)" onmouseout="normal(this)">muss man Text groß schreiben</span><br>
<span onmouseover="bigger(this)" onmouseout="normal(this)">um ihn visuell</span><br>
<span onmouseover="bigger(this)" onmouseout="normal(this)">hervorzuheben</span><br>
<span onmouseover="bigger(this)" onmouseout="normal(this)">scriptwelt.org</span><br>