Do hlavičky vlož...<SCRIPT TYPE="text/javascript">
<!--
var counter = 10;
var lokaceWebu = "http://www.keli.websnadno.cz";
function casovaFunkce()
{
document.getElementById('vypisPocitadla').innerHTML = --counter+"...";
if (counter==0)
{
document.location.href = lokaceWebu;
clearTimeout(mujTimer);
}
}
<center>
<b><font face="Times New Roman"><FONT COLOR=blue size=3>Přivítá náv�těvníka jeho jménem</FONT></FONT></b>
<SCRIPT LANGUAGE="JavaScript">
var x=prompt("Zadejte svoje jméno, v oslovovacím pádě: např.: Tondo")
document.write("<MARQUEE behavior=alternate width=250 height=53><Font color=navy size=4>Vítej na této stránce, "+x+"</font></marquee>");
</SCRIPT>
</center>
Fáze měsíce
<script language="JavaScript">
<!--
function showMoon() {
var height=1;
var size = 25;
var i;
var currentDate = new Date();
var x = currentDate;
currentDate.setTime(currentDate.getTime() + (currentDate.getTimezoneOffset()*60000));
var blueMoonDate = new Date(96, 1, 3, 16, 15, 0);
var lunarPeriod = 29*(24*3600*1000) + 12*(3600*1000) + 44.05*(60*1000);
var moonPhaseTime = (currentDate.getTime() - blueMoonDate.getTime()) % lunarPeriod;
var percentRaw = (moonPhaseTime / lunarPeriod);
var percent = Math.round(100*percentRaw) / 100;
var percentBy2 = Math.round(200*percentRaw);
var left = (percentRaw >= 0.5) ? "mblack.gif" : "mwhite.gif";
var right = (percentRaw >= 0.5) ? "mwhite.gif" : "mblack.gif";
for (i = -(size-1); i < size; ++i) {
var wid=2*parseFloat(Math.sqrt((size*size)-(i*i)));
if (percentBy2 != 100)
document.write ("<img src="+left +" height=1 width="+(wid*((100-percentBy2)/100))+">")
if (percentBy2 != 0)
document.write ("<img src="+right+" height=1 width="+(wid*((percentBy2)/100))+">")
document.write ("<br>")
}
document.write( "</center>",
"Příští úplněk bude za ",
Math.round((lunarPeriod-moonPhaseTime)/(24*3600*1000)),
" dní",
"")
}
// -->
</script>
<script>
showMoon();
</script>
Hlášky-klikni na nadpis
Ukázka <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>onclick</title>
<SCRIPT TYPE="text/javascript">
function hlaska(){
alert('Kliknul jsi na nadpis.')
alert('Tak už na něj neklikej.')
alert('Ale to už tady jednou bylo.')
}
</SCRIPT>
</head>
<body>
<h1 onclick="hlaska()">Klikni na tenhle nadpis!</h1>
</body>
</html>
function OverEff( Nb, Ovstate )
{
if ( Ovstate == 'over' )
{
if ( Nb == 1 )
{
document.getElementById( "first" ).style.color = "#00CCFF";
document.getElementById( "first" ).style.backgroundColor = "red";
}
if ( Nb == 2 )
{
document.getElementById( "second" ).style.color = "#00FF00";
document.getElementById( "second" ).style.backgroundColor = "#0000FF";
}
if ( Nb == 3 )
{
document.getElementById( "third" ).style.color = "#00FF00";
document.getElementById( "third" ).style.backgroundColor = "#0000FF";
}
if ( Nb == 4 )
{
document.getElementById( "fourth" ).style.color = "#00FF00";
document.getElementById( "fourth" ).style.backgroundColor = "#0000FF";
}
}
if ( Ovstate == 'out' )
{
if ( Nb == 1 )
{
document.getElementById( "first" ).style.color = "red";
document.getElementById( "first" ).style.backgroundColor = "#00CCFF";
}
if ( Nb == 2 )
{
document.getElementById( "second" ).style.color = "#0000FF";
document.getElementById( "second" ).style.backgroundColor = "#00FF00";
}
if ( Nb == 3 )
{
document.getElementById( "third" ).style.color = "#0000FF";
document.getElementById( "third" ).style.backgroundColor = "#00FF00";
}
if ( Nb == 4 )
{
document.getElementById( "fourth" ).style.color = "#0000FF";
document.getElementById( "fourth" ).style.backgroundColor = "#00FF00";
}
}
}
// ---------------------------------------
function DoIt()
{
if ( i < 0 )
{
i += 4;
document.getElementById( "second" ).style.left = i;
}
if ( j < 0 )
{
j += 4;
document.getElementById( "third" ).style.left = j;
}
if ( k < 0 )
{
k += 4;
document.getElementById( "fourth" ).style.left = k;
}
if ( ( k == 0 ) || ( SlideIn == false ) )
{
clearInterval( Over );
}
}
// ---------------------------------------
function ReversIt()
{
if ( ( i > - 300 ) && ( j < - 100 ) && ( k < - 200 ) )
{
i -= 4;
document.getElementById( "second" ).style.left = i;
}
if ( ( j > - 400 ) && ( k < - 200 ) )
{
j -= 4;
document.getElementById( "third" ).style.left = j;
}
if ( k > - 500 )
{
k -= 4;
document.getElementById( "fourth" ).style.left = k;
}
if ( ( k == - 500 ) || ( SlideIn == true ) )
{
clearInterval( Out );
}
}
// ---------------------------------------
function Go()
{
SlideIn = ! SlideIn;
if( SlideIn == true )
{
Over = setInterval( "DoIt()", 1 );
}
else
{
Out = setInterval( "ReversIt()", 1 );
}
}
// ---------------------------------------
function Load( Nb )
{
if ( Nb == 1 )
{
window.location = "http://www.keli.websnadno.cz";
}
if ( Nb == 2 )
{
window.location = "http://www.keli.websnadno.cz";
}
if ( Nb == 3 )
{
window.location = "http://www.keli.websnadno.cz";
}
}
</script>
</body>
</html>
Barevné rozbalovací menu
<HTML><head>
<SEQUENCE order="Text1, Text2, Text3, Text4, Text5, Text6, Text7" speed="20"
type="auto" increments=10>
<SCRIPT LANGUAGE="JavaScript">
var slideShow = new Object();
function initSequence(s) {
var sTemp = s.sequences[s.currentSequence];
if (null != sTemp) {
s.sequencer = new Array();
s.sequencer = sTemp.getAttribute("order").split(", ");
for (var intLoop=0; intLoop < s.sequencer.length;
intLoop++)
if (null != document.all[s.sequencer[intLoop]]) {
var el = document.all[s.sequencer[intLoop]];
el.initTop = el.style.posTop;
el.initLeft = el.style.posLeft;
}
s.speed = (null == sTemp.getAttribute("speed")) ?
20 : sTemp.getAttribute("speed");
s.type = ("auto" == sTemp.getAttribute("type"));
s.increments =
(null == sTemp.getAttribute("increments")) ?
15 : sTemp.getAttribute("increments");
s.inc = 0;
s.position = -1;
}
else {
s.position = null;
if (document.onclick == doFly)
document.onclick = new Function();
}
}
function nextSequence(s) {
if (null != s.position) {
s.position++
if (s.position < s.sequencer.length) {
s.inc = 0;
if (s.type)
window.setTimeout("doFly();", s.speed)
else
document.onclick = doFly;
}
else {
s.currentSequence++;
initSequence(s);
nextSequence(s);
}
}
else {
s.position = null;
if (document.onclick == doFly)
document.onclick = null;
}
}
function slide() {
slideShow.sequences = document.all.tags("SEQUENCE");
slideShow.sequencer = new Array();
if (0 < slideShow.sequences.length) {
slideShow.currentSequence = 0;
initSequence(slideShow);
nextSequence(slideShow);
}
}
function doFly() {
var dt, dl;
var el =
document.all[slideShow.sequencer[slideShow.position]];
document.onclick = null;
slideShow.inc++;
dt = el.initTop / slideShow.increments;
dl = el.initLeft / slideShow.increments;
el.style.posTop = el.style.posTop - dt;
el.style.posLeft = el.style.posLeft - dl;
if (slideShow.inc < slideShow.increments)
window.setTimeout("doFly();", slideShow.speed)
else {
el.style.top = 0;
el.style.left = 0;
nextSequence(slideShow);
}
}
</SCRIPT>
<STYLE TYPE="text/css">
BODY {color:white; BACKGROUND: black url('img001.gif'); }
DIV {position:relative; width:100%; font-size:13pt;
height:40px}
H1 {text-align:center; font-size:18pt}
</STYLE>
</head>
/*
Cool Table Menu
By Clarence Eldefors (http://www.freebox.com/cereweb) with modifications from javascriptkit.com
Visit http://javascriptkit.com for this and over 400+ other scripts
*/
function movein(which,html){
which.style.background='coral'
if (document.getElementById)
document.getElementById("boxdescription").innerHTML=html
else
boxdescription.innerHTML=html
}
function moveout(which){
which.style.background='bisque'
if (document.getElementById)
document.getElementById("boxdescription").innerHTML=' '
else
boxdescription.innerHTML=' '
}
<p align="center">
<font face="Verdana, Arial" size="2"><a href="#" onMouseOver="document.bgColor='yellow';" onMouseOut="document.bgColor='white';">Pro změnu barvy pozadí najeď nad tento text</a></font>