This page has been robot translated, sorry for typos if any. Original content here.

Gebrauchsfertige JavaScript-Beispiele

BEISPIEL-1 Bannersystem
Alle Banner-Netzwerke verwenden CGI-Skripte,
Aber wir können mit dem üblichen Java-Skript machen.
Dieses Skript hilft Ihnen bei der Organisation auf Ihrer Website
oder eine Bannerseite.

"Klicken Sie, um den Spoiler anzuzeigen - klicken Sie erneut, um zu verbergen ..."
<code>Первый фрагмент вы вставляете в любое место странички. Лучше в теге &lt;HEAD&gt;. &lt;SCRIPT language=JavaScript&gt;// &lt;!-- Main function banners() { Дальше идёт перечисление ссылок и соответствующих им баннеров. Мы для примера берём 4 ссылки. this[1]="http://www.eurostar.com.ua/rus.htm"; Здесь вы пишете вашу ссылку. this[2]="http://www.eurostar.com.ua/img/banner468x60ru-1.gif"; Здесь указываете путь к графическому файлу this[3]="http://www.eurostar.com.ua/vac.htm"; this[4]="http://www.eurostar.com.ua/img/banner468x60ru-2.gif"; this[5]="http://www.eurostar.com.ua/promotion.htm"; this[6]="http://www.eurostar.com.ua/img/banner468x60ru-3.gif"; this[7]="http://www.eurostar.com.ua/promotion.htm"; this[8]="http://www.eurostar.com.ua/img/banner468x60ru-4.gif"; Количество таких ссылок может быть любым. Дальше идёт часть скрипта, которая как раз и отвечает за функцию обмена баннерами. Приведём его : if ((navigator.appName == "Netscape") &amp;&amp; (parseInt(navigator.appVersion.substring(0,1)) &lt; 3)) { return(' '); } var j=(new Date()).getSeconds() % 4; document.write('&lt;a href=' + this[2*j+1] + ' target=blank&gt;&lt;img src=' + this[2*j+2] + ' border=0 width=468 height=60&gt;&lt;/a&gt;'); return(' '); } // --&gt;&lt;/SCRIPT&gt;Следует разобрать только одну переменную VAR J. Она должна соответствовать количеству показываемых баннеров. У нас это "4". Следующий фрагмент нужно разместить в том месте, где предполагается вывод на экран баннера. &lt;center&gt;&lt;SCRIPT language=JavaScript&gt;// &lt;!-- Main banners(); // --&gt;&lt;/SCRIPT&gt;</code>





BEISPIEL-2 Ändern des Bildes
Ändern Sie das Bild, wenn das Dokument abhängig von der aktuellen geladen wird
Die Zeit wird mit dem Date-Objekt ausgeführt.
Funktioniert in allen Browsern, die JavaScript unterstützen.
"Klicken Sie, um den Spoiler anzuzeigen - klicken Sie erneut, um zu verbergen ..."
<code>&lt;script language=JavaScript&gt;function ban() { j=(new Date()).getSeconds()%2 this[0]="file1.gif" this[2]="file2.gif" вставьте свои картинки вместо file1.gif и file2.gif document.write("&lt;img src=",this[2*j],"&gt;") return (" "); } &lt;/script&gt;&lt;SCRIPT&gt;document.write(ban()) &lt;/SCRIPT&gt;</code>





BEISPIEL-3 Abstimmung
Wenn es keine Möglichkeit gibt, CGI-Skripte zu verwenden,
und es ist sehr wichtig für Sie, Antworten von Besuchern zu erhalten
Für spezifische Fragen empfehle ich das folgende Skript.
Voting wird mit der Mailto-Funktion erstellt.
"Klicken Sie, um den Spoiler anzuzeigen - klicken Sie erneut, um zu verbergen ..."
<code>&lt;script LANGUAGE=JavaScript&gt;&lt;!-- function SendMail(){ document.forms[0].action="mailto: name@company.com?body=Vote="+ document.forms[0].menu.options[document.forms[0]. menu.selectedIndex].value; } //--&gt;&lt;/script&gt;&lt;form method=post name=form onsubmit=SendMail()&gt;&lt;SELECT name=menu size=1&gt; кол-во видимых полей 1-5 &lt;option value=1&gt;1 &lt;option value=2&gt;2 &lt;option value=3&gt;3 &lt;option value=4&gt;4 &lt;option value=5&gt;5 &lt;/select&gt;&lt;input type=submit value="Отправить"&gt;&lt;/form&gt;</code>





BEISPIEL-4 Zwei Rahmen
Java-Skript, das durch Klicken auf den Link geöffnet wird
Seite mit zwei Frames.

"Klicken Sie, um den Spoiler anzuzeigen - klicken Sie erneut, um zu verbergen ..."
<code>&lt;a href=" javascript: loadFrames(&amp;#39;http://www.eurostar.com.ua/&amp;#39;, &amp;#39;www.eurostar.com.ua/promotion.htm&amp;#39;) "&gt; Нажмите здесь. &lt;/a&gt; &lt;SCRIPT LANGUAGE=JavaScript&gt;&lt;!-- Begin function loadFrames(page1, page2) { framecode = "&lt;frameset rows='50%,50%'&gt;" + "&lt;frame src='" + page1 + "'&gt;" + "&lt;frame src='" + page2 + "'&gt;" + "&lt;/frameset&gt;"; page = window.open(""); page.document.open(); page.document.write(framecode); page.document.close(); } // End --&gt;&lt;/script&gt;</code>





Beispiel-5 stündlich 17.02.2002 08:00:00

"Klicken Sie, um den Spoiler anzuzeigen - klicken Sie erneut, um zu verbergen ..."
<code>&lt;script language=JavaScript&gt;function fulltime() { var time=new Date(); document.clock.full.value=time.toLocaleString(); setTimeout('fulltime()',500) } &lt;/script&gt;&lt;center&gt;&lt;form name=clock&gt;&lt;input type=text size=20 name=full&gt;&lt;/form&gt;&lt;script language=JavaScript&gt;fulltime(); &lt;/script&gt;</code>





BEISPIEL-6 Aktuelles Datum
Aktuelles Datum: So Feb 17 09:24:32 UTC + 0300 2002

"Klicken Sie, um den Spoiler anzuzeigen - klicken Sie erneut, um zu verbergen ..."
<code>&lt;SCRIPT LANGUAGE=JavaScript&gt; current_date = new Date(); document.write("&lt;p&gt;&lt;i&gt;Текуща\я дата:&lt;/i&gt; " + current_date + ".&lt;p&gt;"); &lt;/SCRIPT&gt;</code>





Beispiel-7 Datum Datum : 17.1.2002.

"Klicken Sie, um den Spoiler anzuzeigen - klicken Sie erneut, um zu verbergen ..."
<code>&lt;SCRIPT LANGUAGE=JavaScript&gt; current_date = new Date(); document.write("&lt;i&gt;Число:&lt;/i&gt; " + current_date.getDate() + "." + current_date.getMonth() + "." + current_date.getYear() + "."); &lt;/SCRIPT&gt;</code>





BEISPIEL-8 Grafikuhr und Datum
Darüber hinaus müssen Sie über 14 .gif-Dateien verfügen, die Gesamtgröße von allem
etwa 5 Kbt, in einen Ordner mit dem Dokument .html,
(var text = "Sie können hier Text einfügen ")
Hier können Sie .gif herunterladen

"Klicken Sie, um den Spoiler anzuzeigen - klicken Sie erneut, um zu verbergen ..."
<code>&lt;SCRIPT LANGUAGE=JavaScript&gt;document.write(setClock()) function setClock() { var text = "" var openImage = "&lt;IMG SRC=\"" + getPath(location.href) + "dg" var closeImage = ".gif\" HEIGHT=21 WIDTH=16&gt;" var now = new Date() var hour = now.getHours() var minute = now.getMinutes() now = null var ampm = "" if (hour &gt;= 12) { hour -= 12 ampm = "pm" } else ampm = "am" hour = (hour == 0) ? 12 : hour if (minute &lt; 10) minute = "0" + minute // do not parse this number! minute += "" hour += "" for (var i = 0; i &lt; hour.length; ++i) { text += openImage + hour.charAt(i) + closeImage } text += openImage + "c.gif\" HEIGHT=21 WIDTH=9&gt;" for (var i = 0; i &lt; minute.length; ++i) { text += openImage + minute.charAt(i) + closeImage } text += openImage + ampm + closeImage return text}function getPath(url) { lastSlash = url.lastIndexOf("/") return url.substring(0, lastSlash + 1)} &lt;/SCRIPT&gt;&lt;SCRIPT LANGUAGE=JavaScript&gt;document.write(setDate()) function setDate() { var text = "" var openImage = "&lt;IMG SRC=\"" + getPath(location.href) + "dg" var closeImage = ".gif\" HEIGHT=21 WIDTH=16&gt;" var now = new Date() var date = now.getDate() var month = now.getMonth() var year = now.getYear() now = null month++ // 0 - 11 =&gt; 1 - 12 date += "" month += "" year += "" for (var i = 0; i &lt; date.length; ++i) { text += openImage + date.charAt(i) + closeImage } text += openImage + "p.gif\" HEIGHT=21 WIDTH=9&gt;" for (var i = 0; i &lt; month.length; ++i) { text += openImage + month.charAt(i) + closeImage } text += openImage + "p.gif\" HEIGHT=21 WIDTH=9&gt;" for (var i = 0; i &lt; year.length; ++i) { text += openImage + year.charAt(i) + closeImage } return text}function getPath(url) { lastSlash = url.lastIndexOf("/") return url.substring(0, lastSlash + 1)} &lt;/SCRIPT&gt;</code>





Beispiel-9 Kriechstrecke auf dem Feld

"Klicken Sie, um den Spoiler anzuzeigen - klicken Sie erneut, um zu verbergen ..."
<code>&lt;script language=JavaScript&gt;var line="Бегущая строка"; var speed=150; var i=0; function m_line() { if(i++&lt;line.length) { document.cit.forum.value=line.substring(0,i); } else{ document.cit.forum.value=" "; i=0; } setTimeout('m_line()',speed); } &lt;/script&gt;&lt;center&gt;&lt;form name=cit&gt;&lt;input type=text size=20 name=forum&gt;&lt;/form&gt;&lt;/center&gt;&lt;script language=JavaScript&gt;m_line(); &lt;/script&gt;</code>





BEISPIEL-10 Kriechlinie in der Statuszeile

"Klicken Sie, um den Spoiler anzuzeigen - klicken Sie erneut, um zu verbergen ..."
<code>&lt;html&gt;&lt;head&gt;&lt;title&gt;Бегущая строка&lt;/title&gt;&lt;script language=javascript&gt;function statusmessageobject(p,d) { this.msg = message this.out = " " this.pos = position this.delay = delay this.i = 0 this.reset = clearmessage } function clearmessage() { this.pos = position } var position = 100 var delay = 40 var message = "Бегущая строка" + " в строке статуса" var scroll = new statusmessageobject() function scroller() { for (scroll.i = 0; scroll.i &lt; scroll.pos; scroll.i++) { scroll.out += " " } if (scroll.pos &gt;= 0) scroll.out += scroll.msg else scroll.out = scroll.msg.substring(-scroll.pos,scroll.msg.length) window.status = scroll.out scroll.out = " " scroll.pos-- if (scroll.pos &lt; -(scroll.msg.length)) { scroll.reset() } setTimeout ('scroller()',scroll.delay) } &lt;/script&gt;&lt;/head&gt;&lt;body bgcolor=white onLoad=scroller()&gt;&lt;/body&gt; &lt;/html&gt;</code>





BEISPIEL-11 WILLKOMMEN
Das Skript ermöglicht es Ihnen, den Besucher abhängig von der Tageszeit zu begrüßen.
Fügen Sie diesen Code zwischen Tags ein ...
(wo 18 ist die Zeit, nach der der Abend kommt;
Guten Abend - der Ausdruck der Begrüßung, falls die Zeit Abend ist;
12 - die Zeit, nach der der Tag kommt;
Guten Tag - die Begrüßung bei Tag; Guten Morgen - bzw. morgens.)

"Klicken Sie, um den Spoiler anzuzeigen - klicken Sie erneut, um zu verbergen ..."
<code>&lt;SCRIPT LANGUAGE=JavaScript&gt; &lt;!-- Begin datetoday = new Date(); timenow=datetoday.getTime(); datetoday.setTime(timenow); thehour = datetoday.getHours(); if (thehour &gt; 18) display = "Добрый вечер"; else if (thehour &gt;12) display = "Добрый день"; else display = "Доброе утро"; document.write(display); // End --&gt; &lt;/script&gt;</code>





Beispiel 12
Überprüfen Sie, ob JavaScript im Browser aktiviert ist

"Klicken Sie, um den Spoiler anzuzeigen - klicken Sie erneut, um zu verbergen ..."
<code>&lt;script language=Javascript&gt;&lt;!-- document.write('Yes! JavaScript!'); // --&gt;&lt;/script&gt;&lt;noscript&gt;Your browser can't do JavaScript. &lt;/noscript&gt;&lt;/script&gt;</code>





BEISPIEL-13 Sehr praktisches Menü

"Klicken Sie, um den Spoiler anzuzeigen - klicken Sie erneut, um zu verbergen ..."
<code>&lt;html&gt;&lt;body text=white link=#ff5555 alink=#ff0000 vlink=#999999&gt;&lt;style&gt;.menu{ position: absolute; top:0; z-index: 2;} .submenu{ position: absolute; top: 22; z-index: 0; visibility: hide; visibility: hidden;} &lt;/style&gt;&lt;script&gt;&lt;!-- var old; var memold; var subold; if(document.layers) { window.captureEvents(Event.MOUSEDOWN); window.onmousedown=do_out; } else { document.onmouseup=do_out; } function show_layer(x) { if(document.layers) document.layers[x].visibility="show"; else document.all[x].style.visibility="visible"; } function hide_layer(x) { if(document.layers) document.layers[x].visibility="hide"; else document.all[x].style.visibility="hidden"; } function do_menu(x) { if(!old) old=memold; if(old!=x) { show_layer(x); old=x; } else old=""; } function do_check(x) { if(old &amp;&amp; old!=x) { hide_layer(old); show_layer(x); old=x; } do_submenu(); } function do_out() { if(old) hide_layer(old); memold=old; old=""; do_submenu(); } function do_submenu(x) { if(subold) { hide_layer(subold); subold=""; } if(x) { show_layer(x); subold=x; } } // --&gt;&lt;/script&gt;&lt;div id=m1 class=menu style="left: 5;"&gt;&lt;table bgcolor=000000 cellspacing=0 cellpadding=2 border=1 width=115&gt;&lt;tr&gt;&lt;td&gt;&lt;a href=javascript:do_menu(&amp;#39;m1x&amp;#39;) onmouseover="do_check('m1x')"&gt;&lt;b&gt;Системы&lt;/b&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/code&gt;&lt;div id=m1x class=submenu style="left: 5;"&gt;&lt;table bgcolor=000000 cellspacing=0 cellpadding=2 border=1 width=115&gt;&lt;tr&gt;&lt;td&gt;&lt;a href=http://translate.googleusercontent.com/translate_c?depth=1&amp;amp;hl=ru&amp;amp;prev=hp&amp;amp;rurl=translate.google.com&amp;amp;sl=ru&amp;amp;sp=nmt4&amp;amp;tl=de&amp;amp;u=http:&amp;amp;xid=17259,15700019,15700124,15700149,15700186,15700191,15700201,15700214&amp;amp;usg=ALkJrhh2f35ivkuHidHnsQomUPpkrD0DDA&gt;Windows&lt;/a&gt;&lt;br&gt;&lt;a href=http://translate.googleusercontent.com/translate_c?depth=1&amp;amp;hl=ru&amp;amp;prev=hp&amp;amp;rurl=translate.google.com&amp;amp;sl=ru&amp;amp;sp=nmt4&amp;amp;tl=de&amp;amp;u=http:&amp;amp;xid=17259,15700019,15700124,15700149,15700186,15700191,15700201,15700214&amp;amp;usg=ALkJrhh2f35ivkuHidHnsQomUPpkrD0DDA&gt;Mac&lt;/a&gt;&lt;br&gt;&lt;a href=http://translate.googleusercontent.com/translate_c?depth=1&amp;amp;hl=ru&amp;amp;prev=hp&amp;amp;rurl=translate.google.com&amp;amp;sl=ru&amp;amp;sp=nmt4&amp;amp;tl=de&amp;amp;u=http:&amp;amp;xid=17259,15700019,15700124,15700149,15700186,15700191,15700201,15700214&amp;amp;usg=ALkJrhh2f35ivkuHidHnsQomUPpkrD0DDA&gt;Unix&lt;/a&gt;&lt;br&gt;&lt;a href=http://translate.googleusercontent.com/translate_c?depth=1&amp;amp;hl=ru&amp;amp;prev=hp&amp;amp;rurl=translate.google.com&amp;amp;sl=ru&amp;amp;sp=nmt4&amp;amp;tl=de&amp;amp;u=http:&amp;amp;xid=17259,15700019,15700124,15700149,15700186,15700191,15700201,15700214&amp;amp;usg=ALkJrhh2f35ivkuHidHnsQomUPpkrD0DDA&gt;BeOS&lt;/a&gt; &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;div id=m2 class=menu style="left: 120;"&gt;&lt;table bgcolor=000000 cellspacing=0 cellpadding=2 border=1 width=100&gt;&lt;tr&gt;&lt;td&gt;&lt;a href=javascript:do_menu(&amp;#39;m2x&amp;#39;) onmouseover="do_check('m2x')"&gt;&lt;b&gt;Software&lt;/b&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;div id=m2x class=submenu style="left: 120;"&gt;&lt;table bgcolor=000000 cellspacing=0 cellpadding=2 border=1 width=100&gt;&lt;tr&gt;&lt;td&gt;&lt;a href=http://translate.googleusercontent.com/translate_c?depth=1&amp;amp;hl=ru&amp;amp;prev=hp&amp;amp;rurl=translate.google.com&amp;amp;sl=ru&amp;amp;sp=nmt4&amp;amp;tl=de&amp;amp;u=http:&amp;amp;xid=17259,15700019,15700124,15700149,15700186,15700191,15700201,15700214&amp;amp;usg=ALkJrhh2f35ivkuHidHnsQomUPpkrD0DDA onmouseover="do_submenu('m21x')"&gt;Work&lt;/a&gt; &amp;gt;&amp;gt;&lt;br&gt;&lt;a href=http://translate.googleusercontent.com/translate_c?depth=1&amp;amp;hl=ru&amp;amp;prev=hp&amp;amp;rurl=translate.google.com&amp;amp;sl=ru&amp;amp;sp=nmt4&amp;amp;tl=de&amp;amp;u=http:&amp;amp;xid=17259,15700019,15700124,15700149,15700186,15700191,15700201,15700214&amp;amp;usg=ALkJrhh2f35ivkuHidHnsQomUPpkrD0DDA onmouseover=do_submenu()&gt;Tools&lt;/a&gt;&lt;br&gt;&lt;a href=http://translate.googleusercontent.com/translate_c?depth=1&amp;amp;hl=ru&amp;amp;prev=hp&amp;amp;rurl=translate.google.com&amp;amp;sl=ru&amp;amp;sp=nmt4&amp;amp;tl=de&amp;amp;u=http:&amp;amp;xid=17259,15700019,15700124,15700149,15700186,15700191,15700201,15700214&amp;amp;usg=ALkJrhh2f35ivkuHidHnsQomUPpkrD0DDA onmouseover="do_submenu('m22x')"&gt;Spiele&lt;/a&gt; &amp;gt;&amp;gt; &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;div id=m21x class=submenu style="left: 180; top:24; z-index:1;"&gt;&lt;table bgcolor=000000 cellspacing=0 cellpadding=2 border=1 width=100&gt;&lt;tr&gt;&lt;td&gt;&lt;a href=http://translate.googleusercontent.com/translate_c?depth=1&amp;amp;hl=ru&amp;amp;prev=hp&amp;amp;rurl=translate.google.com&amp;amp;sl=ru&amp;amp;sp=nmt4&amp;amp;tl=de&amp;amp;u=http:&amp;amp;xid=17259,15700019,15700124,15700149,15700186,15700191,15700201,15700214&amp;amp;usg=ALkJrhh2f35ivkuHidHnsQomUPpkrD0DDA&gt;Star Office&lt;/a&gt;&lt;br&gt;&lt;a href=http://translate.googleusercontent.com/translate_c?depth=1&amp;amp;hl=ru&amp;amp;prev=hp&amp;amp;rurl=translate.google.com&amp;amp;sl=ru&amp;amp;sp=nmt4&amp;amp;tl=de&amp;amp;u=http:&amp;amp;xid=17259,15700019,15700124,15700149,15700186,15700191,15700201,15700214&amp;amp;usg=ALkJrhh2f35ivkuHidHnsQomUPpkrD0DDA&gt;Communicator&lt;/a&gt;&lt;br&gt;&lt;a href=http://translate.googleusercontent.com/translate_c?depth=1&amp;amp;hl=ru&amp;amp;prev=hp&amp;amp;rurl=translate.google.com&amp;amp;sl=ru&amp;amp;sp=nmt4&amp;amp;tl=de&amp;amp;u=http:&amp;amp;xid=17259,15700019,15700124,15700149,15700186,15700191,15700201,15700214&amp;amp;usg=ALkJrhh2f35ivkuHidHnsQomUPpkrD0DDA&gt;Photoshop&lt;/a&gt;&lt;a href=http://translate.googleusercontent.com/translate_c?depth=1&amp;amp;hl=ru&amp;amp;prev=hp&amp;amp;rurl=translate.google.com&amp;amp;sl=ru&amp;amp;sp=nmt4&amp;amp;tl=de&amp;amp;u=http:&amp;amp;xid=17259,15700019,15700124,15700149,15700186,15700191,15700201,15700214&amp;amp;usg=ALkJrhh2f35ivkuHidHnsQomUPpkrD0DDA&gt;Freehand&lt;/a&gt; &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;div id=m22x class=submenu style="left: 180; top:58; z-index:1;"&gt;&lt;table bgcolor=000000 cellspacing=0 cellpadding=2 border=1 width=100&gt;&lt;tr&gt;&lt;td&gt;&lt;a href=http://translate.googleusercontent.com/translate_c?depth=1&amp;amp;hl=ru&amp;amp;prev=hp&amp;amp;rurl=translate.google.com&amp;amp;sl=ru&amp;amp;sp=nmt4&amp;amp;tl=de&amp;amp;u=http:&amp;amp;xid=17259,15700019,15700124,15700149,15700186,15700191,15700201,15700214&amp;amp;usg=ALkJrhh2f35ivkuHidHnsQomUPpkrD0DDA&gt;Tomb Raider&lt;/a&gt;&lt;br&gt;&lt;a href=http://translate.googleusercontent.com/translate_c?depth=1&amp;amp;hl=ru&amp;amp;prev=hp&amp;amp;rurl=translate.google.com&amp;amp;sl=ru&amp;amp;sp=nmt4&amp;amp;tl=de&amp;amp;u=http:&amp;amp;xid=17259,15700019,15700124,15700149,15700186,15700191,15700201,15700214&amp;amp;usg=ALkJrhh2f35ivkuHidHnsQomUPpkrD0DDA&gt;Quake&lt;/a&gt;&lt;br&gt;&lt;a href=http://translate.googleusercontent.com/translate_c?depth=1&amp;amp;hl=ru&amp;amp;prev=hp&amp;amp;rurl=translate.google.com&amp;amp;sl=ru&amp;amp;sp=nmt4&amp;amp;tl=de&amp;amp;u=http:&amp;amp;xid=17259,15700019,15700124,15700149,15700186,15700191,15700201,15700214&amp;amp;usg=ALkJrhh2f35ivkuHidHnsQomUPpkrD0DDA&gt;Swing&lt;/a&gt; &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;div id=m3 class=menu style="left: 220;"&gt;&lt;table bgcolor=000000 cellspacing=0 cellpadding=2 border=1 width=100&gt;&lt;tr&gt;&lt;td&gt;&lt;a href=javascript:do_menu(&amp;#39;m3x&amp;#39;) onmouseover="do_check('m3x')"&gt;&lt;b&gt;Hardware&lt;/b&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;div id=m3x class=submenu style="left: 220;"&gt;&lt;table bgcolor=000000 cellspacing=0 cellpadding=2 border=1 width=100&gt;&lt;tr&gt;&lt;td&gt;&lt;a href=http://translate.googleusercontent.com/translate_c?depth=1&amp;amp;hl=ru&amp;amp;prev=hp&amp;amp;rurl=translate.google.com&amp;amp;sl=ru&amp;amp;sp=nmt4&amp;amp;tl=de&amp;amp;u=http:&amp;amp;xid=17259,15700019,15700124,15700149,15700186,15700191,15700201,15700214&amp;amp;usg=ALkJrhh2f35ivkuHidHnsQomUPpkrD0DDA&gt;PC&lt;/a&gt;&lt;br&gt;&lt;a href=http://translate.googleusercontent.com/translate_c?depth=1&amp;amp;hl=ru&amp;amp;prev=hp&amp;amp;rurl=translate.google.com&amp;amp;sl=ru&amp;amp;sp=nmt4&amp;amp;tl=de&amp;amp;u=http:&amp;amp;xid=17259,15700019,15700124,15700149,15700186,15700191,15700201,15700214&amp;amp;usg=ALkJrhh2f35ivkuHidHnsQomUPpkrD0DDA&gt;Mac&lt;/a&gt;&lt;br&gt;&lt;a href=http://translate.googleusercontent.com/translate_c?depth=1&amp;amp;hl=ru&amp;amp;prev=hp&amp;amp;rurl=translate.google.com&amp;amp;sl=ru&amp;amp;sp=nmt4&amp;amp;tl=de&amp;amp;u=http:&amp;amp;xid=17259,15700019,15700124,15700149,15700186,15700191,15700201,15700214&amp;amp;usg=ALkJrhh2f35ivkuHidHnsQomUPpkrD0DDA&gt;Amiga&lt;/a&gt;&lt;br&gt;&lt;a href=http://translate.googleusercontent.com/translate_c?depth=1&amp;amp;hl=ru&amp;amp;prev=hp&amp;amp;rurl=translate.google.com&amp;amp;sl=ru&amp;amp;sp=nmt4&amp;amp;tl=de&amp;amp;u=http:&amp;amp;xid=17259,15700019,15700124,15700149,15700186,15700191,15700201,15700214&amp;amp;usg=ALkJrhh2f35ivkuHidHnsQomUPpkrD0DDA&gt;UNIX&lt;/a&gt; &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;hr style="color: red;"&gt;&lt;br&gt;&lt;br&gt;&lt;P&gt;&lt;font size=+2 color=Green&gt;&lt;i&gt;ПРИМЕР-14&lt;/i&gt; &lt;font size=+1&gt;всплывающая подсказка&lt;/font&gt;&lt;/font&gt;&lt;br&gt;Следующий скрипт будет выдавать всплывающую подсказку при &lt;br&gt;наведении мыши на кнопку или просто на рисунок. &lt;br&gt;&lt;div&gt;&lt;div class=spoiler_main2 onclick=show_hide_text(this)&gt;&lt;u&gt;» Нажмите, чтобы показать спойлер - нажмите опять, чтобы скрыть... «&lt;/u&gt;&lt;/div&gt;&lt;div class=spoiler_main3&gt;&lt;code&gt;&lt;xmp&gt; &lt;html&gt;&lt;head&gt;&lt;meta content="text/html; charset=UTF-8" http-equiv=Content-Type&gt;&lt;script language=JavaScript&gt;if (parseInt(navigator.appVersion)&gt;= 4) { if (navigator.appName == "Netscape") { layerStyleRef="layer."; layerRef="document.layers"; styleSwitch=""; } else { layerStyleRef="layer.style."; layerRef="document.all"; styleSwitch=".style"; } } function show(layerName) { if (parseInt(navigator.appVersion)&gt;= 4) { eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="visible"'); } } function cls(layerName){ if (parseInt(navigator.appVersion)&gt;= 4) { eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"'); } } &lt;/script&gt;&lt;style type=text/css&gt;#text1 { HEIGHT: 80px; LEFT: 0px; POSITION: absolute; TOP: 50px; VISIBILITY: hidden; WIDTH: 250px; Z-INDEX: 10 } &lt;/style&gt;&lt;meta content="Microsoft FrontPage 3.0" name=GENERATOR&gt;&lt;title&gt;Всплывающая подсказка&lt;/title&gt;&lt;/head&gt;&lt;body bgColor=#FFFFFF text=#000000&gt;&lt;div align=center id=text1 style="HEIGHT: 80px; LEFT: 10px; TOP: 15px; WIDTH: 250px"&gt;&lt;table border=0 width=100% bgcolor=#000000 cellspacing=1 cellpadding=2&gt;&lt;TBODY&gt;&lt;tr&gt;&lt;td align=middle bgcolor=#FFFFE1&gt;&lt;p align=center&gt;&lt;font face=Fixedsys color=#FF0000&gt;Всплывающая подсказка&lt;/font&gt;&lt;/p&gt;&lt;p align=left&gt;&lt;font face="MS Sans Serif" size=1&gt; А вот собственно и сама всплывающая подсказка...&lt;br&gt;Она удобна тем, что:&lt;br&gt;1. Она не исчезает в самый неподходящий момент (она исчезнет только после того, как вы уберёте курсор с ссылки);&lt;br&gt;2. Всплывающую подсказку можно добавлять не только к графической ссылке, но и к обычному тексту;&lt;br&gt;3. Здесь можно менять шрифты;&lt;br&gt;4. Можно менять цвета шрифтов;&lt;br&gt;5. Сюда можно вставлять рисунки и т.д.&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/TBODY&gt;&lt;/table&gt;&lt;/code&gt;&lt;p&gt;&lt;a href=http://translate.googleusercontent.com/translate_c?depth=1&amp;amp;hl=ru&amp;amp;prev=hp&amp;amp;rurl=translate.google.com&amp;amp;sl=ru&amp;amp;sp=nmt4&amp;amp;tl=de&amp;amp;u=http://www.eurostar.com.ua/&amp;amp;xid=17259,15700019,15700124,15700149,15700186,15700191,15700201,15700214&amp;amp;usg=ALkJrhgLftqZjpxr9Z8PuSaQQhe3xlJv2A onmouseout="cls('text1');" onmouseover="show('text1');"&gt;&lt;img src=../img/banner88x31.jpg border=0 width=88 height=31&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;hr style="color: red;"&gt;&lt;br&gt;&lt;br&gt;&lt;P&gt;&lt;font size=+2 color=Green&gt;&lt;i&gt;ПРИМЕР-15&lt;/i&gt; &lt;font size=+1&gt;Авто ссылка&lt;/font&gt;&lt;/font&gt;&lt;br&gt;Этот скрипт очень часто применяют для автоматического открытия &lt;br&gt;окна с ссылкой на какого-нибудь спонсора, &lt;br&gt;устанавливайте желаемые размеры окна&lt;br&gt;&lt;div&gt;&lt;div class=spoiler_main2 onclick=show_hide_text(this)&gt;&lt;u&gt;» Нажмите, чтобы показать спойлер - нажмите опять, чтобы скрыть... «&lt;/u&gt;&lt;/div&gt;&lt;div class=spoiler_main3&gt;&lt;code&gt;&lt;xmp&gt; &lt;SCRIPT LANGUAGE=JavaScript&gt;window.open('ВАША ССЫЛКА',"PROBY",'height=300,width=550'); &lt;/SCRIPT&gt;</code>





BEISPIEL-16 Jeden Tag eine neue Nachricht
Dieses Skript wird jeden Tag auf Ihrer Seite einen nützlichen Tipp geben,
und vielleicht etwas anderes, kurz gesagt, irgendeine Ihrer Nachrichten.

"Klicken Sie, um den Spoiler anzuzeigen - klicken Sie erneut, um zu verbergen ..."
<code>&lt;html&gt;&lt;table border=0 width=100% bgcolor=#E8E8E8 cellspacing=0 cellpadding=0&gt;&lt;tr&gt;&lt;td width=100%&gt;&lt;script&gt;&lt;!-- var today_obj=new Date() var today_date=today_obj.getDate() var tips=new Array() //Можете вставить свой заголовок var tiptitle=' &lt;b&gt;Совет дня&lt;/b&gt;&lt;br&gt;' //Измените на свои советы tips[1]='Совет на 1 день месяца' tips[2]='Совет на 2 день месяца' tips[3]='Совет на 3 день месяца' tips[4]='Совет на 4 день месяца' tips[5]='Совет на 5 день месяца' tips[6]='Совет на 6 день месяца' tips[7]='Совет на 7 день месяца' tips[8]='Совет на 8 день месяца' tips[9]='Совет на 9 день месяца' tips[10]='Совет на 10 день месяца' tips[11]='Совет на 11 день месяца' tips[12]='Совет на 12 день месяца' tips[13]='Совет на 13 день месяца' tips[14]='Совет на 14 день месяца' tips[15]='Совет на 15 день месяца' tips[16]='Совет на 16 день месяца' tips[17]='Совет на 17 день месяца' tips[18]='Совет на 18 день месяца' tips[19]='Совет на 19 день месяца' tips[20]='Совет на 20 день месяца' tips[21]='Совет на 21 день месяца' tips[22]='Совет на 22 день месяца' tips[23]='Совет на 23 день месяца' tips[24]='Совет на 24 день месяца' tips[25]='Совет на 25 день месяца' tips[26]='Совет на 26 день месяца' tips[27]='Совет на 27 день месяца' tips[28]='Совет на 28 день месяца' tips[29]='Совет на 29 день месяца' tips[30]='Совет на 30 день месяца' tips[31]='Совет на 31 день месяца' document.write(tiptitle) document.write(tips[today_date]) //--&gt;&lt;/script&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/HTML&gt;</code>





BEISPIEL-17 Fallende Schneeflocken
Dieses Skript erzeugt auf der Seite die Wirkung von fallendem Schnee (Blätter, etc.)
Ändern Sie das Bild in dieser Zeile des Skripts:
var schneeflocke = "1.gif"; ( Hier können Sie Schneeflocken, Blätter herunterladen )

"Klicken Sie, um den Spoiler anzuzeigen - klicken Sie erneut, um zu verbergen ..."
<code>&lt;SCRIPT LANGUAGE=JavaScript1.2&gt;&lt;!-- Begin var no = 35; // колличество снежинок var speed = 6; // скорость снежинок var snowflake = "1.gif"; var ns4up = (document.layers) ? 1 : 0; var ie4up = (document.all) ? 1 : 0; var dx, xp, yp; var am, stx, sty; var i, doc_width = 800, doc_height = 600; if (ns4up) { doc_width = self.innerWidth; doc_height = self.innerHeight; } else if (ie4up) { doc_width = document.body.clientWidth; doc_height = document.body.clientHeight; } dx = new Array(); xp = new Array(); yp = new Array(); am = new Array(); stx = new Array(); sty = new Array(); for (i = 0; i &lt; no; ++ i) { dx[i] = 0; xp[i] = Math.random()*(doc_width-50); yp[i] = Math.random()*doc_height; am[i] = Math.random()*20; stx[i] = 0.02 + Math.random()/10; sty[i] = 0.7 + Math.random(); if (ns4up) { if (i == 0) { document.write("&lt;layer name=\"dot"+ i +"\" left=\"15\" "); document.write("top=\"15\" visibility=\"show\"&gt;&lt;img src=\""); document.write(snowflake + "\" border=\"0\"&gt;&lt;/layer&gt;"); } else { document.write("&lt;layer name=\"dot"+ i +"\" left=\"15\" "); document.write("top=\"15\" visibility=\"show\"&gt;&lt;img src=\""); document.write(snowflake + "\" border=\"0\"&gt;&lt;/layer&gt;"); } } else if (ie4up) { if (i == 0) { document.write("&lt;div id=\"dot"+ i +"\" style=\"POSITION: "); document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: "); document.write("visible; TOP: 15px; LEFT: 15px;\"&gt;&lt;img src=\""); document.write(snowflake + "\" border=\"0\"&gt;"); } else { document.write("&lt;div id=\"dot"+ i +"\" style=\"POSITION: "); document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: "); document.write("visible; TOP: 15px; LEFT: 15px;\"&gt;&lt;img src=\""); document.write(snowflake + "\" border=\"0\"&gt;&lt;/div&gt;"); } } } function snowNS() { for (i = 0; i &lt; no; ++ i) { yp[i] += sty[i]; if (yp[i] &gt; doc_height-50) { xp[i] = Math.random()*(doc_width-am[i]-30); yp[i] = 0; stx[i] = 0.02 + Math.random()/10; sty[i] = 0.7 + Math.random(); doc_width = self.innerWidth; doc_height = self.innerHeight; } dx[i] += stx[i]; document.layers["dot"+i].top = yp[i]; document.layers["dot"+i].left = xp[i] + am[i]*Math.sin(dx[i]); } setTimeout("snowNS()", speed); } function snowIE() { for (i = 0; i &lt; no; ++ i) { yp[i] += sty[i]; if (yp[i] &gt; doc_height-50) { xp[i] = Math.random()*(doc_width-am[i]-30); yp[i] = 0; stx[i] = 0.02 + Math.random()/10; sty[i] = 0.7 + Math.random(); doc_width = document.body.clientWidth; doc_height = document.body.clientHeight; } dx[i] += stx[i]; document.all["dot"+i].style.pixelTop = yp[i]; document.all["dot"+i].style.pixelLeft = xp[i] + am[i]*Math.sin(dx[i]); } setTimeout("snowIE()", speed); } if (ns4up) { snowNS(); } else if (ie4up) { snowIE(); } // End --&gt;&lt;/script&gt;</code>





BEISPIEL-18 Fügen Sie der Seite Ton und Video hinzu

"Klicken Sie, um den Spoiler anzuzeigen - klicken Sie erneut, um zu verbergen ..."
Sie können Ihrer Seite Sounds oder Videoclips hinzufügen.
Sie können beim Laden der Seite automatisch gestartet werden.
Im Folgenden finden Sie eine Liste der Attribute, die Sie verwenden können
um das gewünschte Ziel zu erreichen
(Sie werden alle im Tag <EMBED ...> </ EMBED> verwendet):
SRC = name.ext - Name des Audios, Videoclip.
ALIGN = CENTER - Die Position des Bedienfelds (LINKS | MITTE | RECHTS).
WIDTH = X - wobei X die Breite des Videoclips in Pixeln ist.
HEIGHT = Y - wobei Y die Höhe des Videoclips in Pixel ist.
AUTOSTART = TRUE - erlaubt oder verbietet dem Browser, einen Clip beim Laden der Seite zu starten (TRUE | FALSE).
REPEAT = TRUE - aktiviert oder deaktiviert das Wiederholen des Audio- / Videoclips (TRUE | FALSE).
PLAY_LOOP = Z - wenn Sie REPEAT = TRUE angegeben haben, geben Sie hier statt Z die Anzahl der Wiederholungen an.
CONTROLS = SMALLCONSOLE - Verwenden Sie dieses Attribut, wenn das Kontrollfeld klein sein soll.
HIDDEN = TRUE - und dieses Attribut ist notwendig, um das Control Panel nicht anzuzeigen (TRUE | FALSE).

Hier sind einige Beispiele für die Verwendung von Audio- / Videoclips

<code>WAV файл со стандартным пультом управления: &lt;EMBED SRC="файл.wav" WIDTH=145 HEIGHT=55&gt;&lt;/EMBED&gt; MIDI файл со стандартным пультом управления: &lt;EMBED SRC="файл.mid" WIDTH=145 HEIGHT=55&gt;&lt;/EMBED&gt; AVI видео: &lt;EMBED SRC="файл.avi" WIDTH=300 HEIGHT=200&gt;&lt;/EMBED&gt;</code>





BEISPIEL-19 Dropdown-Menü
Wenn Sie mehrere Dropdown-Menüs auf der Seite verwenden möchten,
Jedes Menü sollte einen individuellen Namen haben, es hat ein Menü.
Wenn beispielsweise zwei Menüs vorhanden sind, schreiben Sie im zweiten Menü1
anstelle von Menü.

"Klicken Sie, um den Spoiler anzuzeigen - klicken Sie erneut, um zu verbergen ..."
<code>&lt;form&gt; &lt;select name=menu&gt; &lt;option value=../notes.htm&gt;Статьи - Все для Вебмастера &lt;option selected value=java1-10.htm&gt;Примеры JavaScript1-10 &lt;option value=../applets.htm&gt;Примеры апплетов &lt;option value=../promotion.htm&gt;Все для раскрутки сайта &lt;/select&gt; &lt;input type=button value=Ok onclick="top.location.href = this.form.menu.options[this.form.menu.selectedIndex].value"&gt; &lt;/form&gt;</code>





BEISPIEL-20 Datum der Dokumentaktualisierung
Dieses Skript wurde entwickelt, um Ihre Zeit zu sparen.
Dadurch müssen Sie das Datum der Aktualisierung des Dokuments nicht ändern
mit jeder Änderung. Es ist besonders nützlich, wenn Sie aktualisieren
sehr

"Klicken Sie, um den Spoiler anzuzeigen - klicken Sie erneut, um zu verbergen ..."
<code>&lt;FONT SIZE=-1&gt;Документ обновлен: &lt;SCRIPT LANGUAGE=JavaScript&gt;&lt;!-- document.writeln(document.lastModified) // --&gt;&lt;/SCRIPT&gt;&lt;/FONT&gt;</code>





Beispiel-21 blinkende Verbindungen
Dieser Code wird zwischen den Tags <HEAD> ... </ HEAD> eingefügt:

"Klicken Sie, um den Spoiler anzuzeigen - klicken Sie erneut, um zu verbergen ..."
<code>&lt;script language=JavaScript&gt;&lt;!-- function initArray() { for (var i = 0; i &lt; initArray.arguments.length; i++) { this[i] = initArray.arguments[i]; } this.length = initArray.arguments.length; } // далее вы заполняете массив цветами, которые в последствии // и будут поочередно меняться у ссылки var colors = new initArray( "#008000", "green", "#C6C68C", "green", "blue", "purple", "black", "red"); pause_time = 0.5; // в секундах link = 0; // начиная с этого номера в массиве // (о котором уже говорилось выше) будут меняться цвета у ссылок vlink = 4; // тоже самое, только для просмотренных ссылок function linkDance() { link = (link+1)%colors.length; vlink = (vlink+1)%colors.length; document.linkColor = colors[link]; document.vlinkColor = colors[vlink]; setTimeout("linkDance();",pause_time*1000); } linkDance(); // --&gt;&lt;/script&gt;</code>





BEISPIEL-22 Unterstreichen Sie die Referenz, wenn Sie die Maus darüber bewegen
Dieser Code wird zwischen den Tags <HEAD> ... </ HEAD> eingefügt:

"Klicken Sie, um den Spoiler anzuzeigen - klicken Sie erneut, um zu verbergen ..."
<code>&lt;style type=text/css&gt;&lt;!-- A:link {text-decoration: none;} A:visited {text-decoration: none;} A:hover {text-decoration: underline; } --&gt;&lt;/style&gt;</code>





BEISPIEL-23 Menü mit Tastenbeleuchtung, Links
Ersetzen Sie Ihre .gif, Links und verwenden Sie!

"Klicken Sie, um den Spoiler anzuzeigen - klicken Sie erneut, um zu verbergen ..."
<code>&lt;HTML&gt;&lt;HEAD&gt; &lt;title&gt;меню с подсветкой кнопок, ссылок&lt;/title&gt;&lt;script language=JavaScript1.2&gt;function high(which2){ theobject=which2 highlighting=setInterval("highlightit(theobject)",50) } function low(which2){ clearInterval(highlighting) which2.filters.alpha.opacity=30 } function highlightit(cur2){ if (cur2.filters.alpha.opacity&lt;100) cur2.filters.alpha.opacity+=5 else if (window.highlighting) clearInterval(highlighting) } &lt;/script&gt;&lt;/HEAD&gt;&lt;BODY BGCOLOR=#ffffff TEXT=#000000 LINK=#0000FF VLINK=#7F007F ALINK=#FF0000&gt;&lt;H2&gt;&lt;center&gt;Загарающееся меню.&lt;/H2&gt;&lt;HR&gt;&lt;a href=http://translate.googleusercontent.com/translate_c?depth=1&amp;amp;hl=ru&amp;amp;prev=hp&amp;amp;rurl=translate.google.com&amp;amp;sl=ru&amp;amp;sp=nmt4&amp;amp;tl=de&amp;amp;u=http://www.shram.kiev.ua/site/js.shtml&amp;amp;xid=17259,15700019,15700124,15700149,15700186,15700191,15700201,15700214&amp;amp;usg=ALkJrhjAG-o5Idrri0Gn61Z3Uw6in1YUlg#nul&gt;&lt;img src=name.gif border=0 style=filter:alpha(opacity=50) onMouseover=high(this) onMouseout=low(this)&gt;&lt;/a&gt;&lt;a href=http://translate.googleusercontent.com/translate_c?depth=1&amp;amp;hl=ru&amp;amp;prev=hp&amp;amp;rurl=translate.google.com&amp;amp;sl=ru&amp;amp;sp=nmt4&amp;amp;tl=de&amp;amp;u=http://www.shram.kiev.ua/site/js.shtml&amp;amp;xid=17259,15700019,15700124,15700149,15700186,15700191,15700201,15700214&amp;amp;usg=ALkJrhjAG-o5Idrri0Gn61Z3Uw6in1YUlg#nul&gt;&lt;img src=name.gif border=0 style=filter:alpha(opacity=50) onMouseover=high(this) onMouseout=low(this)&gt;&lt;/a&gt;&lt;a href=http://translate.googleusercontent.com/translate_c?depth=1&amp;amp;hl=ru&amp;amp;prev=hp&amp;amp;rurl=translate.google.com&amp;amp;sl=ru&amp;amp;sp=nmt4&amp;amp;tl=de&amp;amp;u=http://www.shram.kiev.ua/site/js.shtml&amp;amp;xid=17259,15700019,15700124,15700149,15700186,15700191,15700201,15700214&amp;amp;usg=ALkJrhjAG-o5Idrri0Gn61Z3Uw6in1YUlg#nul&gt;&lt;img src=name.gif border=0 style=filter:alpha(opacity=50) onMouseover=high(this) onMouseout=low(this)&gt;&lt;/a&gt;&lt;/BODY&gt;&lt;/HTML&gt;</code>





BEISPIEL-24 Mit der GO-Taste

"Klicken Sie, um den Spoiler anzuzeigen - klicken Sie erneut, um zu verbergen ..."
<code>&lt;Form&gt;&lt;Select Name=mymenu&gt; &lt;Option Value=http://&gt;Ваш текст - 1 &lt;Option Value=http //"&gt;Ваш текст - 2 &lt;Option Value=http //"&gt;Ваш текст - 3 &lt;Option Value=http //"&gt;Ваш текст - 4 &lt;/Select&gt; &lt;Input Type=button Value=Go OnClick=top.location.href=this.form.mymenu.options[this.form.mymenu.selectedIndex].value&gt;&lt;/Form&gt;</code>





BEISPIEL-25 Menü ohne GO-Taste

"Klicken Sie, um den Spoiler anzuzeigen - klicken Sie erneut, um zu verbergen ..."
<code>&lt;Form&gt;&lt;Input Type=hidden Name="select value"&gt; &lt;Select Name=sel Size=1 OnChange="top.location.href = this.options[this.selectedIndex].value;"&gt; &lt;Option selected value=#&gt;Навигация по сайту&lt;/Option&gt; &lt;Option value=http://&gt;Ваш текст - 1&lt;/Option&gt; &lt;Option value=http://&gt;Ваш текст - 2&lt;/Option&gt; &lt;Option value=http://&gt;Ваш текст - 3&lt;/Option&gt; &lt;Option value=http://&gt;Ваш текст - 4&lt;/Option&gt;&lt;/Select&gt;&lt;/Form&gt;</code>





BEISPIEL-26 Menü Navigator im Formular

"Klicken Sie, um den Spoiler anzuzeigen - klicken Sie erneut, um zu verbergen ..."
<code>&lt;TABLE border=2 bgcolor=black cellspacing=0 cellpadding=1&gt;&lt;TD align=center&gt;&lt;B&gt;&lt;FONT FACE=arial FONT SIZE=+1 COLOR=white&gt;НАВИГАТОР&lt;/FONT&gt;&lt;br&gt;&lt;/B&gt;&lt;/TD&gt;&lt;/tr&gt;&lt;tr&gt; &lt;script language=JavaScript&gt; &lt;!-- Hide this from older browsers function gotoPage (form) { if (form.way.selectedIndex == 0) parent.location="http://www.eurostar.com.ua"; if (form.way.selectedIndex == 1) parent.location="http://"; if (form.way.selectedIndex == 2) parent.location="http://"; if (form.way.selectedIndex == 3) parent.location="http://"; if (form.way.selectedIndex == 4) parent.location="http://"; if (form.way.selectedIndex == 5) parent.location="http://"; if (form.way.selectedIndex == 6) parent.location="http://"; if (form.way.selectedIndex == 7) parent.location="http://"; if (form.way.selectedIndex == 8) parent.location="http://"; if (form.way.selectedIndex == 9) parent.location="http://"; if (form.way.selectedIndex == 10) parent.location="http://"; if (form.way.selectedIndex == 11) parent.location="http://"; if (form.way.selectedIndex == 12) parent.location="http://www.eurostar.com.ua"; if (form.way.selectedIndex == 13) parent.location="http://www.eurostar.com.ua"; } document.write('&lt;td valign="middle"&gt;&lt;center&gt;&lt;form name="WebNavigator"&gt;'); document.write('&lt;select name="way" size="5" onChange="gotoPage(this.form)"&gt;'); document.write('&lt;option&gt;Евро Транс'); document.write('&lt;option&gt;2. Link'); document.write('&lt;option&gt;3. Link'); document.write('&lt;option&gt;4. Link'); document.write('&lt;option&gt;5. Link'); document.write('&lt;option&gt;6. Link'); document.write('&lt;option&gt;7. Link'); document.write('&lt;option&gt;8. Link'); document.write('&lt;option&gt;9. Link'); document.write('&lt;option&gt;10. Link'); document.write('&lt;option&gt;11. Link'); document.write('&lt;option&gt;12. Link'); document.write('&lt;option&gt;13. Link'); document.write('&lt;option&gt;14. Link'); document.write('&lt;/select&gt;'); document.write('&lt;/form&gt;&lt;/td&gt;'); // End hide --&gt; &lt;/script&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align=center&gt;&lt;b&gt;&lt;font face=arial size=0 color=white&gt;Выбирай и жми!&lt;/b&gt;&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</code>





BEISPIEL-27 Menü mit Kommentaren

"Klicken Sie, um den Spoiler anzuzeigen - klicken Sie erneut, um zu verbergen ..."
<code>&lt;HTML&gt;&lt;HEAD&gt; &lt;title&gt;Меню с комментариями&lt;/title&gt; &lt;script&gt;&lt;!-- var content=new Array() //change the array below to the text associated with your links Expand or contract the array, depending on how many links you have content[0]='&lt;h3&gt;&lt;font color="Green"&gt;Java Applets&lt;/font&gt;&lt;/h3&gt;Примеры апплетов' content[1]='&lt;h3&gt;&lt;font color="Navy"&gt;Java Scripts&lt;/font&gt;&lt;/h3&gt;&lt;br&gt;Примеры JavaScript' content[2]='&lt;h3&gt;&lt;font color="Maroon"&gt;Архив Статей&lt;/font&gt;&lt;/h3&gt;&lt;br&gt;Архив статей - ВСЕ для ВЕБМАСТЕРА!' content[3]='&lt;h3&gt;&lt;font color="Olive"&gt;Промоушин&lt;/font&gt;&lt;/h3&gt;&lt;br&gt;Раскрутка сайта - самые эффективные методы' content[4]='&lt;h3&gt;&lt;font color="Purple"&gt;Справочники&lt;/font&gt;&lt;/h3&gt;&lt;br&gt;Ваш текст.&lt;/h3&gt;' function regenerate(){ window.location.reload() } function regenerate2(){ if (document.layers) setTimeout("window.onresize=regenerate",450) } function changetext(whichcontent){ if (document.all) descriptions.innerHTML='&lt;font face="Verdana"&gt;&lt;small&gt;'+whichcontent+'&lt;font&gt;&lt;/small&gt;' else if (document.layers){ document.d1.document.d2.document.write('&lt;font face="Verdana"&gt;&lt;small&gt;'+whichcontent+'&lt;/small&gt;&lt;/font&gt;') document.d1.document.d2.document.close() } } //--&gt;&lt;/script&gt;&lt;/HEAD&gt;&lt;BODY BGCOLOR=#ffffff TEXT=#000000 LINK=#0000FF VLINK=#7F007F ALINK=#FF0000&gt;&lt;center&gt;&lt;H3&gt;&lt;center&gt;Меню с комментариями.&lt;/H3&gt;&lt;HR&gt;&lt;div id=scriptmenu style=line-height:20px&gt;&lt;p&gt;&lt;strong&gt;&lt;font face=Verdana&gt; &lt;a href=http://translate.googleusercontent.com/translate_c?depth=1&amp;amp;hl=ru&amp;amp;prev=hp&amp;amp;rurl=translate.google.com&amp;amp;sl=ru&amp;amp;sp=nmt4&amp;amp;tl=de&amp;amp;u=http://www.shram.kiev.ua/click%3Fhttp://www.eurostar.com.ua/applets.htm&amp;amp;xid=17259,15700019,15700124,15700149,15700186,15700191,15700201,15700214&amp;amp;usg=ALkJrhiOarSWnV_-m-s6Dpkxa-T-X2dMIQ onMouseover=changetext(content[0]) target=_blank&gt;&lt;h6&gt;&lt;font color=Green&gt;Java Applets&lt;/font&gt;&lt;/a&gt; &lt;a href=http://translate.googleusercontent.com/translate_c?depth=1&amp;amp;hl=ru&amp;amp;prev=hp&amp;amp;rurl=translate.google.com&amp;amp;sl=ru&amp;amp;sp=nmt4&amp;amp;tl=de&amp;amp;u=http://www.shram.kiev.ua/click%3Fhttp://www.eurostar.com.ua/java.htm&amp;amp;xid=17259,15700019,15700124,15700149,15700186,15700191,15700201,15700214&amp;amp;usg=ALkJrhhpPLTkHMqCjT7GzMvESlkCEW5Hew onMouseover=changetext(content[1]) target=_blank&gt;&lt;font color=Navy&gt;Java Scripts&lt;/font&gt;&lt;/a&gt; &lt;a href=http://translate.googleusercontent.com/translate_c?depth=1&amp;amp;hl=ru&amp;amp;prev=hp&amp;amp;rurl=translate.google.com&amp;amp;sl=ru&amp;amp;sp=nmt4&amp;amp;tl=de&amp;amp;u=http://www.shram.kiev.ua/click%3Fhttp://www.eurostar.com.ua/notes.htm&amp;amp;xid=17259,15700019,15700124,15700149,15700186,15700191,15700201,15700214&amp;amp;usg=ALkJrhjeyn5T_Mbbol_32yWrngANorVrrw onMouseover=changetext(content[2]) target=_blank&gt;&lt;font color=Maroon&gt;Архив статей&lt;/font&gt;&lt;/a&gt; &lt;a href=http://translate.googleusercontent.com/translate_c?depth=1&amp;amp;hl=ru&amp;amp;prev=hp&amp;amp;rurl=translate.google.com&amp;amp;sl=ru&amp;amp;sp=nmt4&amp;amp;tl=de&amp;amp;u=http://www.shram.kiev.ua/promotion.htm&amp;amp;xid=17259,15700019,15700124,15700149,15700186,15700191,15700201,15700214&amp;amp;usg=ALkJrhhNlxR0zg2OMJArrofYLaF9tW1OFA onMouseover=changetext(content[3]) target=_blank&gt;&lt;font color=Olive&gt;Промоушин&lt;/font&gt;&lt;/a&gt; &lt;a href=http://translate.googleusercontent.com/translate_c?depth=1&amp;amp;hl=ru&amp;amp;prev=hp&amp;amp;rurl=translate.google.com&amp;amp;sl=ru&amp;amp;sp=nmt4&amp;amp;tl=de&amp;amp;u=http://www.shram.kiev.ua/click%3Fhttp://www.eurostar.com.ua&amp;amp;xid=17259,15700019,15700124,15700149,15700186,15700191,15700201,15700214&amp;amp;usg=ALkJrhgm72HoVt03q6sSslavcUCfYmFFZw onMouseover=changetext(content[4]) target=_blank&gt;&lt;font color=Purple&gt;Справочники&lt;/font&gt;&lt;/a&gt;&lt;/h6&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;</code>





BEISPIEL-28 Doppelmenü

"Klicken Sie, um den Spoiler anzuzeigen - klicken Sie erneut, um zu verbergen ..."
<code>&lt;SCRIPT LANGUAGE=JavaScript&gt;&lt;!-- var maxLength = 10; website = new Array; website[0] = "Морской бизнес"; website[1] = "Все для Вебмастера"; website[2] = "Разное"; website[3] = "Трудоустройство"; var trueLength = website.length; var lst = website.length; url = new Array; url[0] = "http://"; url[1] = "http://"; url[2] = "http://"; url[3] = "http://"; url[4] = "http://"; ccselect = new Array; ccselect[0] = "Морской бизнес"; ccselect[1] = "Все для Вебмастера"; ccselect[2] = "Разное"; ccselect[3] = "Трудоустройство"; function changePage() { menuNum = document.ccDoubleList.ccBitsyG.selectedIndex; if (menuNum == null){alert("Please select a category from the menu.");return;} else { i = document.ccDoubleList.ccDoubleZ.selectedIndex; window.location.href = url[i]; } } function changeMenu() { website.length = 0; menuNum = document.ccDoubleList.ccBitsyG.selectedIndex; if (menuNum == null) return; if (menuNum == 0) { website = new Array; website[0] = new Option("Услуги нашего агентства"); website[1] = new Option("Оформление паспорта моряка"); website[2] = new Option("STCW документы"); website[3] = new Option("Морские ссылки(компании, порты, суда..."); website[4] = new Option("Открытые вакансии для моряков"); website[5] = new Option("Анкета для моряка"); website[6] = new Option("Cправочник морских сокращений"); website[7] = new Option("Наши реквизиты"); url = new Array; url[0] = "http://www.eurostar.com.ua/rus.htm"; url[1] = "http://www.eurostar.com.ua/seaid.htm"; url[2] = "http://www.eurostar.com.ua/stcw.htm"; url[3] = "http://www.eurostar.com.ua/mlink.htm"; url[4] = "http://www.eurotrans.com.ua/vac.htm"; url[5] = "http://www.eurostar.com.ua/form.doc"; url[6] = "http://www.eurostar.com.ua/az/az.htm"; url[7] = "http://www.eurostar.com.ua/contactru.htm"; } if (menuNum == 1) { website = new Array; website[0] = new Option("Статьи"); website[1] = new Option("Раскрутка сайта"); website[2] = new Option("Примеры аплетов"); website[3] = new Option("Примеры JavaScript"); website[4] = new Option("Полезные ссылки, проги"); website[5] = new Option("Обмен баннерами"); website[6] = new Option("Бесплатныe Web Site Hosting"); website[7] = new Option("Бесплатные e-mail"); url = new Array; url[0] = "http://www.eurostar.com.ua/notes.htm"; url[1] = "http://www.eurostar.com.ua/promotion.htm"; url[2] = "http://www.eurostar.com.ua/applets.htm"; url[3] = "http://www.eurostar.com.ua/java.htm"; url[4] = "http://www.eurostar.com.ua/ok.htm"; url[5] = "http://www.eurostar.com.ua/exch.htm"; url[6] = "http://www.eurostar.com.ua/freeweb.htm"; url[7] = "http://www.eurostar.com.ua/emailfree.htm"; } if (menuNum == 2) { website = new Array; website[0] = new Option("Мощный поисковик(42 в 1)"); website[1] = new Option("Обзор поисковиков "); website[2] = new Option("Обзор Каталогов"); website[3] = new Option("Доски бесплатных объявлений"); website[4] = new Option("Желтые страницы"); website[5] = new Option("Бесплатные звонки и факс"); website[6] = new Option("Бесплатные телефонные карточки"); website[7] = new Option("Виртуальный Херсон"); website[8] = new Option("Вся халява Инета здесь!"); url = new Array; url[0] = "http://www.eurostar.com.ua/multipoisk.htm"; url[1] = "http://www.eurostar.com.ua/search.htm"; url[2] = "http://www.eurostar.com.ua/catalog.htm"; url[3] = "http://www.eurostar.com.ua/bbs.htm"; url[4] = "http://www.eurostar.com.ua/yp.htm"; url[5] = "http://www.eurostar.com.ua/phfaxfree.htm"; url[6] = "http://www.eurostar.com.ua/phcardfree.htm"; url[7] = "http://www.eurostarstar.com.ua/kherson.htm"; url[8] = "http://top-halyava.ru/index.php?id=823"; } if (menuNum == 3) { website = new Array; website[0] = new Option("a"); website[1] = new Option("b"); website[2] = new Option("c"); website[3] = new Option("d"); website[4] = new Option("e"); url = new Array; url[0] = "http://"; url[1] = "http://"; url[2] = "http://"; url[3] = "http://"; url[4] = "http://"; } tot = website.length; for (i = lst; i &gt; 0; i--) { document.ccDoubleList.ccDoubleZ.options[i] = null; } for (i = 0; i &lt; tot; i++) { document.ccDoubleList.ccDoubleZ.options[i] = website[i]; } document.ccDoubleList.ccDoubleZ.options[0].selected = true; lst = website.length; } // --&gt;&lt;/SCRIPT&gt;&lt;SCRIPT LANGUAGE=JavaScript&gt;&lt;!-- with (document) { writeln('&lt;CENTER&gt;'); writeln('&lt;TABLE BORDER=3 BGCOLOR=#ffffff CELLPADDING=3 CELLSPACING=0&gt;'); writeln('&lt;TR&gt;&lt;TD COLSPAN=3&gt;&lt;FORM NAME="ccDoubleList"&gt;'); writeln('&lt;CENTER&gt;&lt;FONT SIZE=4 COLOR=#808080 FACE=ARIAL&gt;'); writeln('&lt;font color="Green"&gt;Двойное меню&lt;/font&gt;&lt;/FONT&gt;&lt;/CENTER&gt;'); writeln('&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD ALIGN=LEFT&gt;'); writeln('&lt;FONT SIZE=3 COLOR=#808080 FACE=ARIAL&gt;&lt;B&gt;&lt;font color="Navy"&gt;&lt;center&gt;Меню&lt;/font&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;br&gt;'); writeln('&lt;SELECT NAME="ccBitsyG" onChange="changeMenu(this.form)"&gt;'); tot = ccselect.length; for (i = 0; i &lt; tot; i++) writeln("&lt;OPTION&gt;" +ccselect[i]); writeln("&lt;/SELECT&gt;"); writeln('&lt;/TD&gt;&lt;TD&gt;'); writeln('&lt;FONT SIZE=3 COLOR=#808080 FACE=ARIAL&gt;&lt;B&gt;&lt;font color="Blue"&gt;&lt;center&gt;Подменю&lt;/font&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;br&gt;'); writeln('&lt;SELECT NAME="ccDoubleZ"&gt;'); for (i = 0; i &lt; maxLength; i++) writeln("&lt;OPTION&gt;" +website[i]); writeln("&lt;/SELECT&gt;"); for (i = maxLength; i &gt; trueLength; i--) { ccDoubleList.ccDoubleZ.options[i] = null; } writeln('&lt;/TD&gt;&lt;TD VALIGN=center&gt;&lt;A HREF = "javascript:changePage();"&gt;'); writeln('&lt;font size="+3" color="Green"&gt;&lt;b&gt;GO&lt;/b&gt;&lt;/font&gt;&lt;/a&gt;'); writeln('&lt;/TD&gt;&lt;/TR&gt;'); changeMenu(); writeln('&lt;/FORM&gt;'); writeln('&lt;/TABLE&gt;&lt;P&gt;&lt;br&gt;&lt;P&gt;'); writeln('&lt;/CENTER&gt;'); } // --&gt;&lt;/SCRIPT&gt;&lt;/center&gt;</code>





BEISPIEL-29 Menü mit Untermenü

"Klicken Sie, um den Spoiler anzuzeigen - klicken Sie erneut, um zu verbergen ..."
<code>&lt;script language=JavaScript1.2&gt;&lt;!-- var head="display:''" function doit(header){ var head=header.style if (head.display=="none") head.display="" else head.display="none" } //--&gt;&lt;/script&gt;&lt;h3 style=cursor:hand onClick=doit(document.all[this.sourceIndex+1])&gt;Меню 1&lt;/h3&gt;&lt;span style=display:none style=&amp;{head};&gt;&lt;A href=http://translate.googleusercontent.com/translate_c?depth=1&amp;amp;hl=ru&amp;amp;prev=hp&amp;amp;rurl=translate.google.com&amp;amp;sl=ru&amp;amp;sp=nmt4&amp;amp;tl=de&amp;amp;u=http://www.shram.kiev.ua/site/js.shtml&amp;amp;xid=17259,15700019,15700124,15700149,15700186,15700191,15700201,15700214&amp;amp;usg=ALkJrhjAG-o5Idrri0Gn61Z3Uw6in1YUlg#nul&gt;Links 1&lt;/A&gt;&lt;br&gt;&lt;A href=http://translate.googleusercontent.com/translate_c?depth=1&amp;amp;hl=ru&amp;amp;prev=hp&amp;amp;rurl=translate.google.com&amp;amp;sl=ru&amp;amp;sp=nmt4&amp;amp;tl=de&amp;amp;u=http://www.shram.kiev.ua/site/js.shtml&amp;amp;xid=17259,15700019,15700124,15700149,15700186,15700191,15700201,15700214&amp;amp;usg=ALkJrhjAG-o5Idrri0Gn61Z3Uw6in1YUlg#nul&gt;Links 2&lt;/A&gt;&lt;br&gt;&lt;A href=http://translate.googleusercontent.com/translate_c?depth=1&amp;amp;hl=ru&amp;amp;prev=hp&amp;amp;rurl=translate.google.com&amp;amp;sl=ru&amp;amp;sp=nmt4&amp;amp;tl=de&amp;amp;u=http://www.shram.kiev.ua/site/js.shtml&amp;amp;xid=17259,15700019,15700124,15700149,15700186,15700191,15700201,15700214&amp;amp;usg=ALkJrhjAG-o5Idrri0Gn61Z3Uw6in1YUlg#nul&gt;Links 3&lt;/A&gt;&lt;br&gt;&lt;/span&gt;&lt;h3 style=cursor:hand onClick=doit(document.all[this.sourceIndex+1])&gt;Меню 2&lt;/h3&gt;&lt;span style=display:none style=&amp;{head};&gt;&lt;a href=http://translate.googleusercontent.com/translate_c?depth=1&amp;amp;hl=ru&amp;amp;prev=hp&amp;amp;rurl=translate.google.com&amp;amp;sl=ru&amp;amp;sp=nmt4&amp;amp;tl=de&amp;amp;u=http://www.shram.kiev.ua/site/js.shtml&amp;amp;xid=17259,15700019,15700124,15700149,15700186,15700191,15700201,15700214&amp;amp;usg=ALkJrhjAG-o5Idrri0Gn61Z3Uw6in1YUlg#nul&gt;&lt;img src=name.gif border=0&gt;&lt;/A&gt;&lt;br&gt;&lt;a href=http://translate.googleusercontent.com/translate_c?depth=1&amp;amp;hl=ru&amp;amp;prev=hp&amp;amp;rurl=translate.google.com&amp;amp;sl=ru&amp;amp;sp=nmt4&amp;amp;tl=de&amp;amp;u=http://www.shram.kiev.ua/site/js.shtml&amp;amp;xid=17259,15700019,15700124,15700149,15700186,15700191,15700201,15700214&amp;amp;usg=ALkJrhjAG-o5Idrri0Gn61Z3Uw6in1YUlg#nul&gt;&lt;img src=name.gif border=0&gt;&lt;/A&gt;&lt;br&gt;&lt;a href=http://translate.googleusercontent.com/translate_c?depth=1&amp;amp;hl=ru&amp;amp;prev=hp&amp;amp;rurl=translate.google.com&amp;amp;sl=ru&amp;amp;sp=nmt4&amp;amp;tl=de&amp;amp;u=http://www.shram.kiev.ua/site/js.shtml&amp;amp;xid=17259,15700019,15700124,15700149,15700186,15700191,15700201,15700214&amp;amp;usg=ALkJrhjAG-o5Idrri0Gn61Z3Uw6in1YUlg#nul&gt;&lt;img src=name.gif border=0&gt;&lt;/A&gt;&lt;br&gt;&lt;/span&gt;</code>





BEISPIEL-30 Wenn Sie auf klicken, wird das Menü von oben nach oben verschoben .

"Klicken Sie, um den Spoiler anzuzeigen - klicken Sie erneut, um zu verbergen ..."
<code>&lt;script language=JavaScript&gt;var eypos=-200, ejump=-4; var typos=-260, tjump=-4; var delay=2; function do_menue() { if(typos&gt;-260) { tjump=-4; if(typos&gt;=130) head_fahren(); } ejump=-ejump; if(eypos&lt;=-200 || eypos&gt;=20) menue_fahren(); } function menue_fahren() { if(document.layers) document.menue.top=eypos; else document.all.menue.style.top=eypos; eypos+=ejump; if(eypos&gt;-200 &amp;&amp; eypos&lt;20) setTimeout("menue_fahren()", delay); } function do_head() { if(eypos&gt;-200) { ejump=-4; if(eypos&gt;=20) menue_fahren(); } tjump=-tjump; if(typos&lt;=-260 || typos&gt;=130) head_fahren(); } function head_fahren() { if(document.layers) document.head.top=typos; else document.all.head.style.top=typos; typos+=tjump; if(typos&gt;-260 &amp;&amp; typos&lt;130) setTimeout("head_fahren()", delay); } &lt;/script&gt;&lt;/HEAD&gt;&lt;BODY BGCOLOR=#DDDDDD TEXT=#000000 LINK=#0000FF VLINK=#7F007F ALINK=#FF0000&gt;&lt;div style="position:absolute; z-index:2; left:300;"&gt;&lt;TABLE BORDER=0&gt;&lt;TR&gt;&lt;TD align=center&gt;Навигация по сайту.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;BIG&gt;&lt;TD align=center&gt;&lt;a href=javascript:do_menue()&gt;Нажми здесь!&lt;/a&gt;&lt;/BIG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TABLE&gt;</code>





BEISPIEL-31 Text ändern
Die Breite und Höhe des Bereichs mit dem Text wird durch die Parameter angegeben:
var fwidth = 160 var fheight = 150
Die Verzögerung in der Darstellung von Text wird durch den Parameter faderdelay = 2000 angegeben

"Klicken Sie, um den Spoiler anzuzeigen - klicken Sie erneut, um zu verbergen ..."
<code>&lt;script language=JavaScript1.2&gt; var delay=3500 var fcontent=new Array() begintag='&lt;font face="Arial" size=2&gt;' fcontent[0]="Здесь помещается текст, который вы хотите показывать " fcontent[1]="Этот текст будет периодически меняться..." fcontent[2]="Таких строк может быть сколько угодно." fcontent[3]="Не забывайте заходить на сайт WWW.EUROSTAR.COM.UA/JAVA.HTM" closetag='&lt;/font&gt;' var fwidth=200 var fheight=150 var ie4=document.all&amp;&amp;!document.getElementById var ns4=document.layers var DOM2=document.getElementById var faderdelay=0 var index=0 if (DOM2) faderdelay=2000 function changecontent(){ if (index&gt;=fcontent.length) index=0 if (DOM2){ document.getElementById("fscroller").style.color="rgb(255,255,255)" document.getElementById("fscroller").innerHTML=begintag+fcontent[index]+closetag colorfade() } else if (ie4) document.all.fscroller.innerHTML=begintag+fcontent[index]+closetag else if (ns4){ document.fscrollerns.document.fscrollerns_sub.document.write(begintag+fcontent[index]+closetag) document.fscrollerns.document.fscrollerns_sub.document.close() } index++ setTimeout("changecontent()",delay+faderdelay) } frame=20; hex=255 function colorfade() { if(frame&gt;0) { hex-=12; document.getElementById("fscroller").style.color="rgb("+hex+","+hex+","+hex+")"; frame--; setTimeout("colorfade()",20); } else{ document.getElementById("fscroller").style.color="rgb(0,0,0)"; frame=20; hex=255 } } if (ie4||DOM2) document.write('&lt;div id="fscroller" style="border:0px solid black;width:' +fwidth+';height:'+fheight+';padding:2px"&gt;</code> ') window.onload = Änderungsinhalt





BEISPIEL-32 Menü mit der SELECT-Taste
"Klicken Sie, um den Spoiler anzuzeigen - klicken Sie erneut, um zu verbergen ..."
<code>&lt;Form Name=take&gt;&lt;Select Name=take2 Size=7&gt; &lt;Option Selected Value=../java.htm&gt;JavaScript&lt;/Option&gt; &lt;Option Value=../applets.html&gt;Applets&lt;/Option&gt; &lt;Option Value=../notes.htm&gt;Cтатьи-Все для Вебмастера&lt;/Option&gt; &lt;Option Value=../promotion.htm&gt;Раскрутка сайта&lt;/Option&gt; &lt;Option Value=http://www.eurostar.com.ua&gt;Главная&lt;/Option&gt; &lt;Option Value=http://&gt;Ваш текст - 1&lt;/Option&gt; &lt;Option Value=http://&gt;Ваш текст - 2&lt;/Option&gt; &lt;Option Value=http://&gt;Ваш текст - 3&lt;/Option&gt; &lt;Option Value=http://&gt;Ваш текст - 4&lt;/Option&gt;&lt;/Select&gt;&lt;Script&gt; function taking() {location=document.take.take2.options[document.take.take2.selectedIndex].value} &lt;/Script&gt;&lt;br&gt;&lt;Input Type=button Value="Выбрать" Name=B1 OnClick=taking()&gt;&lt;/Form&gt;</code>





BEISPIEL-33 Das Menü öffnet sich, wenn Sie mit der Maus über die Inschrift fahren
"Klicken Sie, um den Spoiler anzuzeigen - klicken Sie erneut, um zu verbergen ..."
<code>&lt;HTML&gt;&lt;HEAD&gt;&lt;STYLE type=text/css&gt;A:link { COLOR: #ffffff; FONT: 9pt Arial; TEXT-DECORATION: none} A:visited { COLOR: #ffffff; FONT: 9pt Arial; TEXT-DECORATION: none} A:hover { COLOR: #0000ff; FONT: 9pt Arial; TEXT-DECORATION: none} &lt;/STYLE&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;TABLE border=0 height=100 onmouseout="bgColor=''" onmouseover="bgColor='gray'" width=200&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgColor=navy&gt;&lt;FONT color=white&gt;&lt;B&gt;Навигация по сайту&lt;/B&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;TR&gt;&lt;TD onmouseout="bgColor=''" onmouseover="bgColor='76e000'"&gt;&lt;A href=http://translate.googleusercontent.com/translate_c?depth=1&amp;amp;hl=ru&amp;amp;prev=hp&amp;amp;rurl=translate.google.com&amp;amp;sl=ru&amp;amp;sp=nmt4&amp;amp;tl=de&amp;amp;u=http://www.shram.kiev.ua/click%3Fhttp://www.eurostar.com.ua/applets.htm&amp;amp;xid=17259,15700019,15700124,15700149,15700186,15700191,15700201,15700214&amp;amp;usg=ALkJrhiOarSWnV_-m-s6Dpkxa-T-X2dMIQ&gt;&lt;b&gt;Java апплеты&lt;/b&gt;&lt;/A&gt;&lt;/TD&gt;&lt;TR&gt;&lt;TD onmouseout="bgColor=''" onmouseover="bgColor='76e000'"&gt;&lt;A href=http://translate.googleusercontent.com/translate_c?depth=1&amp;amp;hl=ru&amp;amp;prev=hp&amp;amp;rurl=translate.google.com&amp;amp;sl=ru&amp;amp;sp=nmt4&amp;amp;tl=de&amp;amp;u=http://www.shram.kiev.ua/click%3Fhttp://www.eurostar.com.ua/java.htm&amp;amp;xid=17259,15700019,15700124,15700149,15700186,15700191,15700201,15700214&amp;amp;usg=ALkJrhhpPLTkHMqCjT7GzMvESlkCEW5Hew&gt;&lt;b&gt;Java Scripts&lt;/b&gt;&lt;/A&gt;&lt;/TD&gt;&lt;TR&gt;&lt;TD onmouseout="bgColor=''" onmouseover="bgColor='76e000'"&gt;&lt;A href=http://translate.googleusercontent.com/translate_c?depth=1&amp;amp;hl=ru&amp;amp;prev=hp&amp;amp;rurl=translate.google.com&amp;amp;sl=ru&amp;amp;sp=nmt4&amp;amp;tl=de&amp;amp;u=http://www.shram.kiev.ua/click%3Fhttp://www.eurostar.com.ua/notes.htm&amp;amp;xid=17259,15700019,15700124,15700149,15700186,15700191,15700201,15700214&amp;amp;usg=ALkJrhjeyn5T_Mbbol_32yWrngANorVrrw&gt;&lt;b&gt;Статьи&lt;/b&gt;-&lt;font size=-2&gt;Все для Вебмастера&lt;/font&gt;&lt;/A&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</code>





BEISPIEL-34 Bewegliches Menü
Funktioniert nur in IE. Sehr praktische und vielseitige Speisekarte. Es kann an beliebiger Stelle auf der Website platziert werden und fügt alles ein, was Sie möchten - Text, Grafiken und Skripte. Die Besonderheit des Menüs besteht darin, dass es beim Scrollen immer auf dem Bildschirm bleibt und mit der Maus über den gesamten Bildschirm bewegt werden kann.
"Klicken Sie, um den Spoiler anzuzeigen - klicken Sie erneut, um zu verbergen ..."
<code>&lt;HTML&gt;&lt;HEAD&gt;&lt;style TYPE=text/css&gt;#superbest { position: absolute; left: 15; top: 150; width: 125; visibility: visible; z-index: 10; &lt;/style&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;div ID=superbest style="width: 206; height: 194"&gt;&lt;dd&gt;&lt;table BORDER=1 CELLPADDING=0 CELLSPACING=0 width=100%&gt;&lt;tr&gt;&lt;td bgcolor=green size=-2&gt;&lt;font size=-2&gt;меню&lt;/font&gt;&lt;td bgcolor=white&gt;&lt;font face=arial,helvetica size=-1&gt;&lt;font color=Green&gt;&lt;b&gt;Перемещаемое&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;a href=http://translate.googleusercontent.com/translate_c?depth=1&amp;amp;hl=ru&amp;amp;prev=hp&amp;amp;rurl=translate.google.com&amp;amp;sl=ru&amp;amp;sp=nmt4&amp;amp;tl=de&amp;amp;u=http://www.shram.kiev.ua/click%3Fhttp://www.eurostar.com.ua/java.htm&amp;amp;xid=17259,15700019,15700124,15700149,15700186,15700191,15700201,15700214&amp;amp;usg=ALkJrhhpPLTkHMqCjT7GzMvESlkCEW5Hew target=_blank&gt;Коллекция скриптов&lt;br&gt;&lt;/a&gt;&lt;a href=http://translate.googleusercontent.com/translate_c?depth=1&amp;amp;hl=ru&amp;amp;prev=hp&amp;amp;rurl=translate.google.com&amp;amp;sl=ru&amp;amp;sp=nmt4&amp;amp;tl=de&amp;amp;u=http://www.shram.kiev.ua/click%3Fhttp://www.eurostar.com.ua/applets.htm&amp;amp;xid=17259,15700019,15700124,15700149,15700186,15700191,15700201,15700214&amp;amp;usg=ALkJrhiOarSWnV_-m-s6Dpkxa-T-X2dMIQ target=_blank&gt;Коллекция апплетов&lt;br&gt;&lt;/a&gt;&lt;a href=http://translate.googleusercontent.com/translate_c?depth=1&amp;amp;hl=ru&amp;amp;prev=hp&amp;amp;rurl=translate.google.com&amp;amp;sl=ru&amp;amp;sp=nmt4&amp;amp;tl=de&amp;amp;u=http://www.shram.kiev.ua/click%3Fhttp://www.eurostar.com.ua/notes.htm&amp;amp;xid=17259,15700019,15700124,15700149,15700186,15700191,15700201,15700214&amp;amp;usg=ALkJrhjeyn5T_Mbbol_32yWrngANorVrrw target=_blank&gt;Архив статей-ВСЕ для Вебмастера&lt;br&gt;&lt;/a&gt;&lt;a href=http://translate.googleusercontent.com/translate_c?depth=1&amp;amp;hl=ru&amp;amp;prev=hp&amp;amp;rurl=translate.google.com&amp;amp;sl=ru&amp;amp;sp=nmt4&amp;amp;tl=de&amp;amp;u=http://www.shram.kiev.ua/click%3Fhttp://www.eurostar.com.ua/promotion.htm&amp;amp;xid=17259,15700019,15700124,15700149,15700186,15700191,15700201,15700214&amp;amp;usg=ALkJrhjOiy0U2xlA5LLEtS_FadpwF9D1PQ target=_blank&gt; Раскрутка сайта&lt;br&gt;&lt;/a&gt; &lt;a href=http://translate.googleusercontent.com/translate_c?depth=1&amp;amp;hl=ru&amp;amp;prev=hp&amp;amp;rurl=translate.google.com&amp;amp;sl=ru&amp;amp;sp=nmt4&amp;amp;tl=de&amp;amp;u=http://www.shram.kiev.ua/click%3Fhttp://www.eurostar.com.ua/exch.htm&amp;amp;xid=17259,15700019,15700124,15700149,15700186,15700191,15700201,15700214&amp;amp;usg=ALkJrhhcNK0EvBp-KVWDEeCbMbQYvqvyXQ target=_blank&gt;Обмен баннерами&lt;/a&gt;&lt;/font&gt;&lt;br&gt; &lt;script LANGUAGE=JavaScript&gt;&lt;!-- self.onError=null; currentX = currentY = 0; whichIt = null; lastScrollX = 0; lastScrollY = 0; NS = (document.layers) ? 1 : 0; IE = (document.all) ? 1: 0; &lt;!-- STALKER CODE --&gt;function heartBeat() { if(IE) { diffY = document.body.scrollTop; diffX = document.body.scrollLeft; } if(NS) { diffY = self.pageYOffset; diffX = self.pageXOffset; } if(diffY != lastScrollY) { percent = .1 * (diffY - lastScrollY); if(percent &gt; 0) percent = Math.ceil(percent); else percent = Math.floor(percent); if(IE) document.all.superbest.style.pixelTop += percent; if(NS) document.superbest.top += percent; lastScrollY = lastScrollY + percent; } if(diffX != lastScrollX) { percent = .1 * (diffX - lastScrollX); if(percent &gt; 0) percent = Math.ceil(percent); else percent = Math.floor(percent); if(IE) document.all.superbest.style.pixelLeft += percent; if(NS) document.superbest.left += percent; lastScrollX = lastScrollX + percent; } } &lt;!-- /STALKER CODE --&gt;&lt;!-- DRAG DROP CODE --&gt;function checkFocus(x,y) { stalkerx = document.superbest.pageX; stalkery = document.superbest.pageY; stalkerwidth = document.superbest.clip.width; stalkerheight = document.superbest.clip.height; if( (x &gt; stalkerx &amp;&amp; x &lt; (stalkerx+stalkerwidth)) &amp;&amp; (y &gt; stalkery &amp;&amp; y &lt; (stalkery+stalkerheight))) return true; else return false; } function grabIt(e) { if(IE) { whichIt = event.srcElement; while (whichIt.id.indexOf("superbest") == -1) { whichIt = whichIt.parentElement; if (whichIt == null) { return true; } } whichIt.style.pixelLeft = whichIt.offsetLeft; whichIt.style.pixelTop = whichIt.offsetTop; currentX = (event.clientX + document.body.scrollLeft); currentY = (event.clientY + document.body.scrollTop); } else { window.captureEvents(Event.MOUSEMOVE); if(checkFocus (e.pageX,e.pageY)) { whichIt = document.superbest; StalkerTouchedX = e.pageX-document.superbest.pageX; StalkerTouchedY = e.pageY-document.superbest.pageY; } } return true; } function moveIt(e) { if (whichIt == null) { return false; } if(IE) { newX = (event.clientX + document.body.scrollLeft); newY = (event.clientY + document.body.scrollTop); distanceX = (newX - currentX); distanceY = (newY - currentY); currentX = newX; currentY = newY; whichIt.style.pixelLeft += distanceX; whichIt.style.pixelTop += distanceY; if(whichIt.style.pixelTop &lt; document.body.scrollTop) whichIt.style.pixelTop = document.body.scrollTop; if(whichIt.style.pixelLeft &lt; document.body.scrollLeft) whichIt.style.pixelLeft = document.body.scrollLeft; if(whichIt.style.pixelLeft &gt; document.body.offsetWidth - document.body.scrollLeft - whichIt.style.pixelWidth - 20) whichIt.style.pixelLeft = document.body.offsetWidth - whichIt.style.pixelWidth - 20; if(whichIt.style.pixelTop &gt; document.body.offsetHeight + document.body.scrollTop - whichIt.style.pixelHeight - 5) whichIt.style.pixelTop = document.body.offsetHeight + document.body.scrollTop - whichIt.style.pixelHeight - 5; event.returnValue = false; } else { whichIt.moveTo(e.pageX-StalkerTouchedX,e.pageY-StalkerTouchedY); if(whichIt.left &lt; 0+self.pageXOffset) whichIt.left = 0+self.pageXOffset; if(whichIt.top &lt; 0+self.pageYOffset) whichIt.top = 0+self.pageYOffset; if( (whichIt.left + whichIt.clip.width) &gt;= (window.innerWidth+self.pageXOffset-17)) whichIt.left = ((window.innerWidth+self.pageXOffset)-whichIt.clip.width)-17; if( (whichIt.top + whichIt.clip.height) &gt;= (window.innerHeight+self.pageYOffset-17)) whichIt.top = ((window.innerHeight+self.pageYOffset)-whichIt.clip.height)-17; return false; } return false; } function dropIt() { whichIt = null; if(NS) window.releaseEvents (Event.MOUSEMOVE); return true; } &lt;!-- DRAG DROP CODE --&gt;if(NS) { window.captureEvents(Event.MOUSEUP|Event.MOUSEDOWN); window.onmousedown = grabIt; window.onmousemove = moveIt; window.onmouseup = dropIt; } if(IE) { document.onmousedown = grabIt; document.onmousemove = moveIt; document.onmouseup = dropIt; } if(NS || IE) action = window.setInterval("heartBeat()",1); // --&gt;&lt;/script&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt;&lt;/dd&gt;</code>





BEISPIEL-35 Dynamisches Menü
"Klicken Sie, um den Spoiler anzuzeigen - klicken Sie erneut, um zu verbergen ..."
<code>&lt;HTML&gt;&lt;HEAD&gt;&lt;script LANGUAGE=JavaScript&gt;function makeArray(q){ for(i=1 ; i &lt; q ; i++){this[i]=0}} w=1; howmanysites=5; // Цифра 5 указывает сколько ссылок в скрипте Sites = new makeArray(howmanysites); Sites[1] = "http://www.eurostar.com.ua/notes.htm|Архив статей - ВСЕ для Вебмастера!"; //впишите адрес URL перед символом | а далее название ссылки. Sites[2] = "http://www.eurostar.com.ua/java.htm|Примеры JavaScript"; Sites[3] = "http://www.eurostar.com.ua/applets.htm|Примеры апплетов"; Sites[4] = "http://www.eurostar.com.ua/promotion.htm|Раскрутка сайта"; Sites[5] = "http://www.eurostar.com.ua/az/az.htm|Cправочник морской терминологии"; function showSites() { if (w &gt; howmanysites) { w=1; }; var string=Sites[w] + ""; var split=string.indexOf("|"); var url=string.substring(0,split); var word=string.substring(split + 1,string.length); document.form.url.value=url; document.form.word.value=word; w+=1; window.setTimeout('showSites()',3000); // Время переключения в милисекундах, 3000=3 секунд } function visitSite() { window.location=document.form.url.value; } // End --&gt;&lt;/script&gt;&lt;/head&gt;&lt;body&gt;&lt;center&gt;&lt;form name=form&gt;&lt;input type=hidden name=url value&gt;&lt;table&gt;&lt;tr&gt;&lt;td align=center&gt;&lt;input type=text name=word value onFocus=visitSite() size=40&gt; &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/form&gt;&lt;script&gt;showSites(); &lt;/script&gt;&lt;/center&gt;&lt;/BODY&gt;&lt;/HTML&gt;</code>





BEISPIEL-36 Menü auf einem farbigen Hintergrund mit GO-Taste!
"Klicken Sie, um den Spoiler anzuzeigen - klicken Sie erneut, um zu verbergen ..."
<code>&lt;form method=POST action=--WEBBOT-SELF-- name=test&gt;&lt;script&gt;function warp(){ window.location=document.test.test2.options[document.test.test2.selectedIndex].value } &lt;/script&gt;&lt;center&gt;&lt;select name=test2 size=1 style="background-color: rgb(25,238,255); font-weight: bold"&gt; &lt;option selected value=http://www.eurostar.com.ua/notes.htm&gt; Cтатьи-ВСЕ для ВЕБМАСТЕРА!&lt;/option&gt; &lt;option value=http://www.eurostar.com.ua/java.htm&gt;Примеры JavaScript&lt;/option&gt; &lt;option value=http://www.eurostar.com.ua/applets.htm&gt;Примеры апплетов&lt;/option&gt; &lt;option value=http://www.eurostar.com.ua/promotion.htm&gt;Раскрутка сайта&lt;/option&gt; &lt;option value=http://www.eurostar.com.ua/az/az.htm&gt;Морская терминология&lt;/option&gt; &lt;option value=http://www.eurostar.com.ua/vac.htm&gt;Открытые вакансии для моряков&lt;/option&gt; &lt;/select&gt; &lt;a href=javascript:warp() style=text-decoration:none;color:navy;&gt;&lt;font face=Arial&gt;&lt;font size=+2&gt;Go!&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; &lt;/form&gt;&lt;/center&gt;</code>





BEISPIEL-37 Das Menü erscheint nach einem Klick auf das Bild
(Knopf, Banner, Link)

"Klicken Sie, um den Spoiler anzuzeigen - klicken Sie erneut, um zu verbergen ..."
<code>&lt;html&gt;&lt;head&gt;&lt;SCRIPT LANGUAGE=JavaScript&gt; var visibleVar="null"; function init(){ if (navigator.appName == "Netscape") { layerStyleRef="layer."; layerRef="document.layers"; styleSwitch=""; visibleVar="show"; }else{ layerStyleRef="layer.style."; layerRef="document.all"; styleSwitch=".style"; visibleVar="visible"; } } function showHideLayerSwitch(layerName){ if (eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility == visibleVar')){ hideLayer(layerName); }else{ showLayer(layerName); } } function showLayer(layerName){ eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="visible"'); } function hideLayer(layerName){ eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"'); } function showLayer1(layerName){ if (eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility == visibleVar')){ showLayer(layerName); } } function hideLayer1(layerName){ if (eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility == visibleVar')){ hideLayer(layerName); } } &lt;/SCRIPT&gt;&lt;STYLE TYPE=text/css&gt;#pulldownButton {position: absolute; z-index: 59800; left: 300px; top: 50px;} #pulldownMenu {position: absolute; z-index: 59900; visibility: hidden; left: 100px; top: 116px;} &lt;/STYLE&gt;&lt;/head&gt;&lt;body bgcolor=#000000 text=#ffffff link=#ff5555 alink=#ff0000 vlink=#999999 onload=init()&gt; &lt;div id=pulldownButton&gt; &lt;a href=javascript:showHideLayerSwitch(&amp;#39;pulldownMenu&amp;#39;);&gt; &lt;IMG SRC=arrow-left.gif BORDER=0 alt="Жми, здесь ME Н Ю"&gt;&lt;/a&gt;</code>





BEISPIEL-38 Dropdown-Menü ohne eine Schaltfläche - navigieren Sie auf der Website

"Klicken Sie, um den Spoiler anzuzeigen - klicken Sie erneut, um zu verbergen ..."
<code>&lt;Form&gt;&lt;Input Type=hidden Name="select value"&gt; &lt;Select Name=sel Size=1 OnChange="top.location.href = this.options[this.selectedIndex].value;"&gt; &lt;Option selected value=#&gt;Навигация по сайту&lt;/Option&gt; &lt;Option value=http://&gt;Ваш текст - 1&lt;/Option&gt; &lt;Option value=http://&gt;Ваш текст - 2&lt;/Option&gt; &lt;Option value=http://&gt;Ваш текст - 3&lt;/Option&gt; &lt;Option value=http://&gt;Ваш текст - 4&lt;/Option&gt;&lt;/Select&gt;&lt;/Form&gt;</code>





BEISPIEL-39 Dropdown-Menü ohne eine Schaltfläche - navigieren Sie auf der Website
auf einem farbigen Hintergrund

"Klicken Sie, um den Spoiler anzuzeigen - klicken Sie erneut, um zu verbergen ..."
<code>&lt;form&gt; &lt;select name=sel size=1 onchange="top.location.href = this.options[this.selectedIndex].value;" style="background-color: rgb(0,0,0); color: rgb(55,255,0); font-weight: bolder"&gt; &lt;option value=#nul&gt;Навигация по сайту:&lt;/option&gt; &lt;option value=#nul&gt;Ваша ссылка-1&lt;/option&gt; &lt;option value=#nul&gt;Ваша ссылка-2&lt;/option&gt; &lt;option value=#nul&gt;Ваша ссылка-3&lt;/option&gt; &lt;/select&gt;&amp;nbsp;&amp;nbsp; &lt;/p&gt; &lt;/center&gt;</code>





BEISPIEL-40 Datum, Uhrzeit UTC in der Statuszeile

"Klicken Sie, um den Spoiler anzuzeigen - klicken Sie erneut, um zu verbergen ..."
<code>&lt;html&gt;&lt;HEAD&gt; &lt;SCRIPT LANGUAGE=JavaScript&gt;&lt;!-- function show_date_time() { var now=new Date(); window.status=now; window.setTimeout("show_date_time();",1000); } // --&gt;&lt;/SCRIPT&gt; &lt;/HEAD&gt;&lt;BODY BGCOLOR=#FFFFFF TEXT=#000000 onLoad="show_date_time();return true;"&gt;&lt;/BODY&gt;&lt;/html&gt;</code>





BEISPIEL-41 Scroll-Text

"Klicken Sie, um den Spoiler anzuzeigen - klicken Sie erneut, um zu verbergen ..."
<code>&lt;HTML&gt;&lt;HEAD&gt;&lt;title&gt;Text Block Scrolling&lt;/title&gt;&lt;SCRIPT LANGUAGE=JavaScript&gt;var line_beak = "\n" var screen = "" // 1234567890123456789012345678901234567890 screen += "Будем прокручивать " screen += "Данный фрагмент текста " screen += "В поле типа " screen += "TEXTAREA " screen += "формы term " for(i=0;i&lt;6;i++) screen += " " var i=0 var j=40 flag = 0 function scroll() { if( flag== 0 ) { display_str = "" for(k=0;k&lt;11;k++) { display_str += screen.substring(i,j) i +=40;j = i + 40 if(i&gt;400) i = 0 } window.document.term.work_field.value = display_str i += 40 ; if(i&gt;400) i =0 } id = setTimeout("scroll()",1000) return true } function change_button() { if(flag==0) { flag = 1 return true } if(flag == 1) { flag = 0 return false } } &lt;/SCRIPT&gt;&lt;/HEAD&gt;&lt;BODY onLoad=scroll()&gt;&lt;CENTER&gt;&lt;H1&gt;Text Block Scrolling.&lt;/H1&gt;&lt;HR&gt;&lt;FORM NAME=term&gt;&lt;TEXTAREA NAME=work_field COLS=40 ROWS=10 WRAP=ON&gt;&lt; /TEXTAREA&gt;&lt;P&gt;&lt;INPUT NAME=alarm VALUE="Start/Stop" TYPE=button onClick="change_button()"&gt;&lt;/FORM&gt;&lt;/CENTER&gt;&lt;HR&gt;&lt;/BODY&gt;&lt;/HTML&gt;</code>





BEISPIEL-42 Kalender 2000 - 2004
"Klicken Sie, um den Spoiler anzuzeigen - klicken Sie erneut, um zu verbergen ..."
<code>&lt;!-- Вставьте эту часть кода между тегами &lt;HEAD&gt;&lt;/HEAD&gt; вашего документа --&gt;&lt;HEAD&gt;&lt;SCRIPT LANGUAGE="JavaScript"&gt;&lt;!-- Oригинал: Nick Korosi (nfk2000@hotmail.com) --&gt;&lt;!-- Begin var dDate = new Date(); var dCurMonth = dDate.getMonth(); var dCurDayOfMonth = dDate.getDate(); var dCurYear = dDate.getFullYear(); var objPrevElement = new Object(); function fToggleColor(myElement) { var toggleColor = "#ff0000"; if (myElement.id == "calDateText") { if (myElement.color == toggleColor) { myElement.color = ""; } else { myElement.color = toggleColor; } } else if (myElement.id == "calCell") { for (var i in myElement.children) { if (myElement.children[i].id == "calDateText") { if (myElement.children[i].color == toggleColor) { myElement.children[i].color = ""; } else { myElement.children[i].color = toggleColor; } } } } } function fSetSelectedDay(myElement){ if (myElement.id == "calCell") { if (!isNaN(parseInt(myElement.children["calDateText"].innerText))) { myElement.bgColor = "#c0c0c0"; objPrevElement.bgColor = ""; document.all.calSelectedDate.value = parseInt(myElement.children["calDateText"].innerText); objPrevElement = myElement; } } } function fGetDaysInMonth(iMonth, iYear) { var dPrevDate = new Date(iYear, iMonth, 0); return dPrevDate.getDate(); } function fBuildCal(iYear, iMonth, iDayStyle) { var aMonth = new Array(); aMonth[0] = new Array(7); aMonth[1] = new Array(7); aMonth[2] = new Array(7); aMonth[3] = new Array(7); aMonth[4] = new Array(7); aMonth[5] = new Array(7); aMonth[6] = new Array(7); var dCalDate = new Date(iYear, iMonth-1, 1); var iDayOfFirst = dCalDate.getDay(); var iDaysInMonth = fGetDaysInMonth(iMonth, iYear); var iVarDate = 1; var i, d, w; if (iDayStyle == 2) { aMonth[0][0] = "Воскресенье"; aMonth[0][1] = "Понедельник"; aMonth[0][2] = "Вторник"; aMonth[0][3] = "Среда"; aMonth[0][4] = "Четверг"; aMonth[0][5] = "Пятница"; aMonth[0][6] = "Суббота"; } else if (iDayStyle == 1) { aMonth[0][0] = "Вск"; aMonth[0][1] = "Пон"; aMonth[0][2] = "Вт"; aMonth[0][3] = "Ср"; aMonth[0][4] = "Чт"; aMonth[0][5] = "Пт"; aMonth[0][6] = "Сб"; } else { aMonth[0][0] = "Вс"; aMonth[0][1] = "Пн"; aMonth[0][2] = "Вт"; aMonth[0][3] = "Ср"; aMonth[0][4] = "Чт"; aMonth[0][5] = "Пт"; aMonth[0][6] = "Сб"; } for (d = iDayOfFirst; d &lt; 7; d++) { aMonth[1][d] = iVarDate; iVarDate++; } for (w = 2; w &lt; 7; w++) { for (d = 0; d &lt; 7; d++) { if (iVarDate &lt;= iDaysInMonth) { aMonth[w][d] = iVarDate; iVarDate++; } } } return aMonth; } function fDrawCal(iYear, iMonth, iCellWidth, iCellHeight, sDateTextSize, sDateTextWeight, iDayStyle) { var myMonth; myMonth = fBuildCal(iYear, iMonth, iDayStyle); document.write("&lt;table border='1'&gt;") document.write("&lt;tr&gt;"); document.write("&lt;td align='center' style='FONT-FAMILY:Arial;FONT-SIZE:12px;FONT-WEIGHT: bold'&gt;" + myMonth[0][0] + "&lt;/td&gt;"); document.write("&lt;td align='center' style='FONT-FAMILY:Arial;FONT-SIZE:12px;FONT-WEIGHT: bold'&gt;" + myMonth[0][1] + "&lt;/td&gt;"); document.write("&lt;td align='center' style='FONT-FAMILY:Arial;FONT-SIZE:12px;FONT-WEIGHT: bold'&gt;" + myMonth[0][2] + "&lt;/td&gt;"); document.write("&lt;td align='center' style='FONT-FAMILY:Arial;FONT-SIZE:12px;FONT-WEIGHT: bold'&gt;" + myMonth[0][3] + "&lt;/td&gt;"); document.write("&lt;td align='center' style='FONT-FAMILY:Arial;FONT-SIZE:12px;FONT-WEIGHT: bold'&gt;" + myMonth[0][4] + "&lt;/td&gt;"); document.write("&lt;td align='center' style='FONT-FAMILY:Arial;FONT-SIZE:12px;FONT-WEIGHT: bold'&gt;" + myMonth[0][5] + "&lt;/td&gt;"); document.write("&lt;td align='center' style='FONT-FAMILY:Arial;FONT-SIZE:12px;FONT-WEIGHT: bold'&gt;" + myMonth[0][6] + "&lt;/td&gt;"); document.write("&lt;/tr&gt;"); for (w = 1; w &lt; 7; w++) { document.write("&lt;tr&gt;") for (d = 0; d &lt; 7; d++) { document.write("&lt;td align='left' valign='top' width='" + iCellWidth + "' height='" + iCellHeight + "' id=calCell style='CURSOR:Hand' onMouseOver='fToggleColor(this)' onMouseOut='fToggleColor(this)' onclick=fSetSelectedDay(this)&gt;"); if (!isNaN(myMonth[w][d])) { document.write("&lt;font id=calDateText onMouseOver='fToggleColor(this)' style='CURSOR:Hand;FONT-FAMILY:Arial;FONT-SIZE:" + sDateTextSize + ";FONT-WEIGHT:" + sDateTextWeight + "' onMouseOut='fToggleColor(this)' onclick=fSetSelectedDay(this)&gt;" + myMonth[w][d] + "&lt;/font&gt;"); } else { document.write("&lt;font id=calDateText onMouseOver='fToggleColor(this)' style='CURSOR:Hand;FONT-FAMILY:Arial;FONT-SIZE:" + sDateTextSize + ";FONT-WEIGHT:" + sDateTextWeight + "' onMouseOut='fToggleColor(this)' onclick=fSetSelectedDay(this)&gt; &lt;/font&gt;"); } document.write("&lt;/td&gt;") } document.write("&lt;/tr&gt;"); } document.write("&lt;/table&gt;") } function fUpdateCal(iYear, iMonth) { myMonth = fBuildCal(iYear, iMonth); objPrevElement.bgColor = ""; document.all.calSelectedDate.value = ""; for (w = 1; w &lt; 7; w++) { for (d = 0; d &lt; 7; d++) { if (!isNaN(myMonth[w][d])) { calDateText[((7*w)+d)-7].innerText = myMonth[w][d]; } else { calDateText[((7*w)+d)-7].innerText = " "; } } } } // End --&gt;&lt;/script&gt;&lt;/head&gt;&lt;!-- Вставьте эту часть кода в html документ --&gt;&lt;BODY&gt;&lt;script language="JavaScript" for=window event=onload&gt;&lt;!-- Begin var dCurDate = new Date(); frmCalendarSample.tbSelMonth.options[dCurDate.getMonth()].selected = true; for (i = 0; i &lt; frmCalendarSample.tbSelYear.length; i++) if (frmCalendarSample.tbSelYear.options[i].value == dCurDate.getFullYear()) frmCalendarSample.tbSelYear.options[i].selected = true; // End --&gt;&lt;/script&gt;&lt;form name="frmCalendarSample" method="post" action=""&gt;&lt;input type="hidden" name="calSelectedDate" value=""&gt;&lt;table border="1"&gt;&lt;tr&gt;&lt;td&gt;&lt;select name="tbSelMonth" onchange='fUpdateCal(frmCalendarSample.tbSelYear.value, frmCalendarSample.tbSelMonth.value)'&gt;&lt;option value="1"&gt;Январь&lt;/option&gt;&lt;option value="2"&gt;Февраль&lt;/option&gt;&lt;option value="3"&gt;Март&lt;/option&gt;&lt;option value="4"&gt;Апрель&lt;/option&gt;&lt;option value="5"&gt;Май&lt;/option&gt;&lt;option value="6"&gt;Июнь&lt;/option&gt;&lt;option value="7"&gt;Июль&lt;/option&gt;&lt;option value="8"&gt;Август&lt;/option&gt;&lt;option value="9"&gt;Сентябрь&lt;/option&gt;&lt;option value="10"&gt;Октябрь&lt;/option&gt;&lt;option value="11"&gt;Ноябрь&lt;/option&gt;&lt;option value="12"&gt;Декабрь&lt;/option&gt;&lt;/select&gt; &lt;select name="tbSelYear" onchange='fUpdateCal(frmCalendarSample.tbSelYear.value, frmCalendarSample.tbSelMonth.value)'&gt;&lt;option value="2000"&gt;2000&lt;/option&gt;&lt;option value="2001"&gt;2001&lt;/option&gt;&lt;option value="2002"&gt;2002&lt;/option&gt;&lt;option value="2003"&gt;2003&lt;/option&gt;&lt;option value="2004"&gt;2004&lt;/option&gt;&lt;/select&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;script language="JavaScript"&gt;var dCurDate = new Date(); fDrawCal(dCurDate.getFullYear(), dCurDate.getMonth()+1, 30, 30, "12px", "bold", 1); &lt;/script&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/form&gt;&lt;/body&gt;</code>





BEISPIEL-43 Elektronische Uhr (24H)
"Klicken Sie, um den Spoiler anzuzeigen - klicken Sie erneut, um zu verbergen ..."
<code>&lt;body onload="start(document.forms[0])" onunload="cleartids()"&gt;&lt;script language="LiveScript"&gt;function GoBack() { if (confirm("Are you sure you want to go to the previous page?")) { history.back() } } timestr = "00:00:00"; tid = 0; pause = 0; var to; var bcount; var tcount; function writer(){ document.write("test"); } function time(n) { tid=window.setTimeout("time(1)",to); today = new Date() if(today.getMinutes() &lt; 10){ pad = "0"} else pad = ""; if(today.getSeconds() &lt; 10){ pads = "0"} else pads = ""; timestr=today.getHours()+":"+pad+today.getMinutes()+":"+pads+today.getSeconds(); f.result.value = timestr; window.status = timestr; window.clearTimeout(tid); tid=window.setTimeout("time()",to); } function start(x) { f=x; to=60; time(x); } function cleartids() { window.clearTimeout(tid); } &lt;/script&gt;&lt;form name="time"&gt;&lt;input type="text" size="8" name="result" onfocus="this.blur()" style="text-align: center; font-family: sans-serif; font-size: 8pt; background-color: #DAFADE; color: rgb(255,0,0)"&gt;&lt;/form&gt;&lt;/body&gt;</code>





BEISPIEL-44 Elektronische Uhr (AM / PM)
"Klicken Sie, um den Spoiler anzuzeigen - klicken Sie erneut, um zu verbergen ..."
<code>&lt;BODY onLoad="loadclock()"&gt;&lt;CENTER&gt;&lt;span id=tick2&gt;&lt;/span&gt;&lt;script&gt; &lt;!-- function show2(){ var Digital=new Date() var hours=Digital.getHours() var minutes=Digital.getMinutes() var seconds=Digital.getSeconds() var dn="AM" if (hours&gt;12){ dn="PM" hours=hours-12 } if (hours==0) hours=12 if (minutes&lt;=9) minutes="0"+minutes if (seconds&lt;=9) seconds="0"+seconds var ctime="&lt;b&gt;&lt;font face='Verdana' color='#8000FF'&gt;"+hours+":"+minutes+":"+seconds+" "+dn+"&lt;/font&gt;&lt;/b&gt;" if (!document.all) document.write(ctime) else tick2.innerHTML=ctime } function loadclock(){ if (document.all) setInterval("show2()",1000) } if (!document.all) show2() //--&gt;&lt;/script&gt;&lt;/center&gt;&lt;/body&gt;</code>





Beispiel-45 Uhr (24H)
Wird nach dem Klicken aktiviert
"Klicken Sie, um den Spoiler anzuzeigen - klicken Sie erneut, um zu verbergen ..."
<code>&lt;head&gt;&lt;script language=javaScript&gt;&lt;!-- var hours var minutes var seconds function showtime() { var thistime= new Date() hours=thistime.getHours() minutes=thistime.getMinutes() seconds=thistime.getSeconds() if (eval(minutes) &lt; 10) {minutes="0"+minutes} if (eval(seconds) &lt; 10) {seconds="0"+seconds} if (eval(hours) &lt; 10) {hours="0"+localhours} thistime = hours+":"+minutes+":"+seconds document.bigwatch.button.value=thistime var timer= setTimeout("showtime()",1000) } // - End of JavaScript - --&gt;&lt;/script&gt;&lt;/head&gt;&lt;body bgcolor="#FFFFFF"&gt;&lt;form name="bigwatch"&gt;&lt;input name="button" type="button" value="ЧАСЫ !" onClick="showtime()" style="font-family:times;font-size:20pt;color:navy"&gt;&lt;/form&gt;&lt;/body&gt;</code>





BEISPIEL-46 Zeit in verschiedenen Städten
"Klicken Sie, um den Spoiler anzuzeigen - klicken Sie erneut, um zu verbergen ..."
<code>&lt;head&gt;&lt;script language=javaScript&gt;&lt;!-- Beginning of JavaScript - var worldtime = new Array() worldtime[0]="Azores,-1" worldtime[1]="Baghdad,3" worldtime[2]="Beijing,8" worldtime[3]="Berlin,1" worldtime[4]="Buenos Aires,-3" worldtime[5]="Chicago,-6" worldtime[6]="Denver,-7" worldtime[7]="Hong Kong,8" worldtime[8]="Honolulu,-10" worldtime[9]="Johannesburg,2" worldtime[10]="Kairo,2" worldtime[11]="Lima,-5" worldtime[12]="London,0" worldtime[13]="Mexico City,-6" worldtime[14]="Moscow,4" worldtime[15]="New York,-5" worldtime[16]="Paris,1" worldtime[17]="Perth,8" worldtime[18]="Rio de Janheiro,-2" worldtime[19]="San Francisco,-8" worldtime[20]="Sydney,11" worldtime[21]="Tokyo,9" var hours var shifthours var minutes var seconds var localhours var pause=2000 var thisplace var thisline="" var showmenu=1 function showtime() { for (i=0; i&lt;=worldtime.length-1;i++) { thisplace=worldtime[i].split(",") thistime= new Date() hours=thistime.getUTCHours() hours=eval(hours) shifthours=eval(thisplace[1]) localhours=eval(shifthours+hours) if (localhours &lt;0) {localhours=24+localhours} if (localhours &gt;=24) {localhours=localhours-24} minutes=thistime.getUTCMinutes() seconds=thistime.getUTCSeconds() if (thisplace[0]=='Delhi') { minutes=eval(minutes+30) if (minutes&gt;=60) { minutes=eval(minutes-60) localhours=eval(localhours+1) } } if (eval(minutes) &lt; 10) {minutes="0"+minutes} if (eval(seconds) &lt; 10) {seconds="0"+seconds} if (eval(localhours) &lt; 10) {localhours="0"+localhours} thisline+=localhours+":"+minutes+":"+seconds+" "+thisplace[0]+"&lt;br&gt;" } if (document.all) { timediv.innerHTML=thisline thisline="" var timer=setTimeout("showtime()",1000) } if (document.layers) { document.timediv.document.write("&lt;span id='nn' class='timestyle'&gt;") document.timediv.document.write(thisline) document.timediv.document.write("&lt;/span&gt;") document.timediv.document.close() thisline="" } } function dblclick() { if (document.all &amp;&amp; showmenu==1) { document.all.timediv.style.visibility="visible" document.all.timediv.style.posLeft=x document.all.timediv.style.posTop=y showtime() } if (document.layers &amp;&amp; showmenu==1) { document.timediv.visibility="visible" document.timediv.left=x-40 document.timediv.top=y-80 showtime() } if (document.all &amp;&amp; showmenu!=1) { document.all.timediv.style.visibility="hidden" } if (document.layers &amp;&amp; showmenu!=1) { document.timediv.visibility="hidden" } showmenu=showmenu*-1 } if (document.layers) { document.captureEvents(Event.ONDBLCLICK); } document.ondblclick=dblclick; if (document.layers){ document.captureEvents(Event.MOUSEMOVE); } document.onmousemove = handlerMM; function handlerMM(e){ x = (document.layers) ? e.pageX : event.clientX y = (document.layers) ? e.pageY : event.clientY } // - End of JavaScript - --&gt;&lt;/script&gt;&lt;STYLE&gt;.timestyle { position:absolute; left:50px; top:100px; font-family:Verdana; font-size:8pt; color:880000; background-color:DDDDFF; } .explainstyle { position:absolute; left:10px; top:160px; font-family:Verdana; font-size:8pt; color:000000; } &lt;/STYLE&gt;&lt;/head&gt;&lt;body bgcolor=#FFFFFF&gt;&lt;DIV id=source class="explainstyle"&gt;&lt;b&gt;Часы появятся/исчезнут при двойном клике мышью&lt;/b&gt;</code>





BEISPIEL-47 Weltzeit in der Statuszeile

"Klicken Sie, um den Spoiler anzuzeigen - klicken Sie erneut, um zu verbergen ..."
<code>&lt;head&gt;&lt;script language=javaScript&gt;&lt;!-- var worldtime = new Array() worldtime[0]="Azores,-2" worldtime[1]="Baghdad,3" worldtime[2]="Beijing,8" worldtime[3]="Berlin,2" worldtime[4]="Buenos Aires,-3" worldtime[5]="Chicago,-6" worldtime[6]="Denver,-7" worldtime[7]="Hong Kong,8" worldtime[8]="Honolulu,-10" worldtime[9]="Johannesburg,2" worldtime[10]="Kairo,2" worldtime[11]="Lima,-5" worldtime[12]="London,0" worldtime[13]="Mexico City,-6" worldtime[14]="Moscow,4" worldtime[15]="New York,-5" worldtime[16]="Paris,1" worldtime[17]="Perth,8" worldtime[18]="Rio de Janheiro,-3" worldtime[19]="San Francisco,-8" worldtime[20]="Sydney,11" worldtime[21]="Tokyo,9" // The speed of the ticker (milliseconds) var speed=1000 // The length of the steps var step=10 // Do not edit the variables below var hours var shifthours var minutes var seconds var localhours var thisplace var i_substring=0 var content function extracttime() { content=" -------------------------------------" for (i=0;i&lt;=worldtime.length-1;i++) { thisplace=worldtime[i].split(",") thistime= new Date() hours=thistime.getUTCHours() hours=eval(hours) shifthours=eval(thisplace[1]) localhours=eval(shifthours+hours) if (localhours &lt;0) {localhours=24+localhours} if (localhours &gt;=24) {localhours=localhours-24} minutes=thistime.getUTCMinutes() seconds=thistime.getUTCSeconds() if (thisplace[0]=='Delhi') { minutes=eval(minutes+30) if (minutes&gt;=60) { minutes=eval(minutes-60) localhours=eval(localhours+1) } } if (eval(minutes) &lt; 10) {minutes="0"+minutes} if (eval(seconds) &lt; 10) {seconds="0"+seconds} if (eval(localhours) &lt; 10) {localhours="0"+localhours} thistime = localhours+":"+minutes content+=" ------ "+thisplace[0]+": "+thistime } content+=" -------------------------------------" scrolltime() } function scrolltime() { if (i_substring&lt;=content.length-1) { window.status=content.substring(i_substring,content.length-1) i_substring=i_substring+step var timer=setTimeout("extracttime()",speed) } else { i_substring=0 clearTimeout(timer) extracttime() } } // - End of JavaScript - --&gt;&lt;/script&gt;&lt;/head&gt;&lt;body bgcolor=#FFFFFF onLoad="extracttime()"&gt;&lt;DIV ID="deletethisblock" class="redirstyle" style="position:absolute;left:10px;top:110px;color:000000;font-family:Verdana;font-size:10pt"&gt;Мировое время в строке статуса</code>





BEISPIEL-48 Transparente Uhr

"Klicken Sie, um den Spoiler anzuzeigen - klicken Sie erneut, um zu verbergen ..."
<code>&lt;head&gt;&lt;script language=javaScript&gt;&lt;!-- function clockon() { thistime= new Date() var hours=thistime.getHours() var minutes=thistime.getMinutes() var seconds=thistime.getSeconds() if (eval(hours) &lt;10) {hours="0"+hours} if (eval(minutes) &lt; 10) {minutes="0"+minutes} if (seconds &lt; 10) {seconds="0"+seconds} thistime = hours+":"+minutes+":"+seconds if(document.all) { bgclocknoshade.innerHTML=thistime bgclockshade.innerHTML=thistime } if(document.layers) { document.bgclockshade.document.write('&lt;div id="bgclockshade" style="position:absolute;visibility:visible;font-family:Verdana;color:FFAAAAA;font-size:120px;top:10px;left:12px"&gt;'+thistime+'</code> ') document.bgclocknoshade.document.write ('
'+ thistime +'
') document.close ()} var timer = setTimeout ("clockon ()", 200)} // - Ende von JavaScript - ->

ALLES FÜR WEBMASTER

JavaScript-Beispiele

Beispiele für Applets

Artikel Archiv

Werbung für die Website

Sie haben ein neues Originalprojekt erstellt, es auf einem guten Hosting veröffentlicht, Zähler eingerichtet, aber sie zeigen nur Ihre Besuche Tag für Tag, sowie Besuche Ihrer Freunde und Kollegen. Was zu tun ist? Kann nichts getan werden? Sie können! Wenn Sie sicher sind, dass Ihre Website nicht so aussieht, wie sie aussieht,
Du kannst anfangen

Internet Grundbegriffe

Tabelle der Farbcodes

HTML-Verzeichnis






BEISPIEL-49 Kalender (1 Monat + Zeit)

"Klicken Sie, um den Spoiler anzuzeigen - klicken Sie erneut, um zu verbergen ..."
<code>&lt;HEAD&gt; &lt;title&gt;Календарь&lt;/title&gt; &lt;/HEAD&gt;&lt;BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#7F007F" ALINK="#FF0000"&gt;&lt;SCRIPT LANGUAGE="JavaScript"&gt;&lt;!-- setCal() function getTime() { // initialize time-related variables with current time settings var now = new Date() var hour = now.getHours() var minute = now.getMinutes() now = null var ampm = "" // validate hour values and set value of ampm if (hour &gt;= 12) { hour -= 12 ampm = "PM" } else ampm = "AM" hour = (hour == 0) ? 12 : hour // add zero digit to a one digit minute if (minute &lt; 10) minute = "0" + minute // do not parse this number! // return time string return hour + ":" + minute + " " + ampm } function leapYear(year) { if (year % 4 == 0) // basic rule return true // is leap year /* else */ // else not needed when statement is "return" return false // is not leap year } function getDays(month, year) { // create array to hold number of days in each month var ar = new Array(12) ar[0] = 31 // January ar[1] = (leapYear(year)) ? 29 : 28 // February ar[2] = 31 // March ar[3] = 30 // April ar[4] = 31 // May ar[5] = 30 // June ar[6] = 31 // July ar[7] = 31 // August ar[8] = 30 // September ar[9] = 31 // October ar[10] = 30 // November ar[11] = 31 // December // return number of days in the specified month (parameter) return ar[month] } function getMonthName(month) { // create array to hold name of each month var ar = new Array(12) ar[0] = "January" ar[1] = "February" ar[2] = "March" ar[3] = "April" ar[4] = "May" ar[5] = "June" ar[6] = "July" ar[7] = "August" ar[8] = "September" ar[9] = "October" ar[10] = "November" ar[11] = "December" // return name of specified month (parameter) return ar[month] } function setCal() { // standard time attributes var now = new Date() var year = now.getYear() var month = now.getMonth() var monthName = getMonthName(month) var date = now.getDate() now = null // create instance of first day of month, and extract the day on which it occurs var firstDayInstance = new Date(year, month, 1) var firstDay = firstDayInstance.getDay() firstDayInstance = null // number of days in current month var days = getDays(month, year) // call function to draw calendar drawCal(firstDay + 0, days, date, monthName, 0 + year) } function drawCal(firstDay, lastDate, date, monthName, year) { // constant table settings var headerHeight = 50 // height of the table's header cell var border = 2 // 3D height of table's border var cellspacing = 4 // width of table's border var headerColor = "midnightblue" // color of table's header var headerSize = "+3" // size of tables header font var colWidth = 50 // width of columns in table var dayCellHeight = 25 // height of cells containing days of the week var dayColor = "darkblue" // color of font representing week days var cellHeight = 40 // height of cells representing dates in the calendar var todayColor = "red" // color specifying today's date in the calendar var timeColor = "purple" // color of font representing current time // create basic table structure var text = "" // initialize accumulative variable to empty string text += '&lt;CENTER&gt;' text += '&lt;TABLE BORDER=' + border + ' CELLSPACING=' + cellspacing + '&gt;' // table settings text += '&lt;TH COLSPAN=7 HEIGHT=' + headerHeight + '&gt;' // create table header cell text += '&lt;FONT COLOR="' + headerColor + '" SIZE=' + headerSize + '&gt;' // set font for table header text += monthName + ' ' + year text += '&lt;/FONT&gt;' // close table header's font settings text += '&lt;/TH&gt;' // close header cell // variables to hold constant settings var openCol = '&lt;TD WIDTH=' + colWidth + ' HEIGHT=' + dayCellHeight + '&gt;' openCol += '&lt;FONT COLOR="' + dayColor + '"&gt;' var closeCol = '&lt;/FONT&gt;&lt;/TD&gt;' // create array of abbreviated day names var weekDay = new Array(7) weekDay[0] = "Sun" weekDay[1] = "Mon" weekDay[2] = "Tues" weekDay[3] = "Wed" weekDay[4] = "Thu" weekDay[5] = "Fri" weekDay[6] = "Sat" // create first row of table to set column width and specify week day text += '&lt;TR ALIGN="center" VALIGN="center"&gt;' for (var dayNum = 0; dayNum &lt; 7; ++dayNum) { text += openCol + weekDay[dayNum] + closeCol } text += '&lt;/TR&gt;' // declaration and initialization of two variables to help with tables var digit = 1 var curCell = 1 for (var row = 1; row &lt;= Math.ceil((lastDate + firstDay - 1) / 7); ++row) { text += '&lt;TR ALIGN="right" VALIGN="top"&gt;' for (var col = 1; col &lt;= 7; ++col) { if (digit &gt; lastDate) break if (curCell &lt; firstDay) { text += '&lt;TD&gt;&lt;/TD&gt;' curCell++ } else { if (digit == date) { // current cell represent today's date text += '&lt;TD HEIGHT=' + cellHeight + '&gt;' text += '&lt;FONT COLOR="' + todayColor + '"&gt;' text += digit text += '&lt;/FONT&gt;&lt;br&gt;' text += '&lt;FONT COLOR="' + timeColor + '" SIZE=2&gt;' text += '&lt;CENTER&gt;' + getTime() + '&lt;/CENTER&gt;' text += '&lt;/FONT&gt;' text += '&lt;/TD&gt;' } else text += '&lt;TD HEIGHT=' + cellHeight + '&gt;' + digit + '&lt;/TD&gt;' digit++ } } text += '&lt;/TR&gt;' } // close all basic table tags text += '&lt;/TABLE&gt;' text += '&lt;/CENTER&gt;' // print accumulative HTML string document.write(text) } // --&gt;&lt;/SCRIPT&gt;&lt;/BODY&gt;</code>





BEISPIEL-50 Anzahl, Zeit in Worten

"Klicken Sie, um den Spoiler anzuzeigen - klicken Sie erneut, um zu verbergen ..."
<code>&lt;BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#7F007F" ALINK="#FF0000"&gt; &lt;SCRIPT LANGUAGE="JavaScript"&gt;current_date = new Date(); document.write("&lt;p&gt;&lt;i&gt;Текуща\я дата:&lt;/i&gt; " + current_date + ".&lt;p&gt;"); &lt;/SCRIPT&gt; &lt;br&gt;Также можно вывести сокращенный вариант для этого используются методы getDate, getMonth, getYear. Обратите внимание, что нумерация месяцев начинается с нуля. &lt;SCRIPT LANGUAGE="JavaScript"&gt;current_date = new Date(); document.write("&lt;p&gt;&lt;i&gt;Число:&lt;/i&gt; " + current_date.getDate() + "." + current_date.getMonth() + "." + current_date.getYear() + ".&lt;p&gt;"); &lt;/SCRIPT&gt;&lt;br&gt;Или такой вариант: &lt;SCRIPT LANGUAGE="JavaScript"&gt;current_date = new Date(); document.write("&lt;p&gt;&lt;i&gt;Врем\я:&lt;/i&gt; " + current_date.getHours() + "." + current_date.getMinutes() + "." + current_date.getSeconds() + ".&lt;p&gt;"); &lt;/SCRIPT&gt; &lt;/BODY&gt;</code>