Best Page

HOME

javascript download, javascript turned off, javascript tutorial, javascript turned off, zákaz vstupu na web s firefoxem, javascript nevyplněné pole formuláře, náhodné zobrazení obrázku, banneru, běžící obrázek

Rady pro Váš web, blog:

Předchozí stránka  1  2  3  4  5  6  Další stránka

  !!! Zde uvedené scripty a ostatní věci lze kopírovat. Pod názvem klikněte na slovo Download, poté lze kopírovat !!!

 

Běžící obrázek

download

<marquee><img src=" obrazek.gif" width="16" height="17"></marquee>

 

Plynulá změna barvy textu při najetí myší

download

 <script>
<!--

col = new Array()
col[0]="111111"
col[1]="333333"
col[2]="555555"
col[3]="777777"
col[4]="999999"
col[5]="AAAAAA"
col[6]="CCCCCC"
col[7]="FFFFFF"
col[8]="CCCCCC"
col[9]="AAAAAA"
col[10]="999999"
col[11]="777777"
col[12]="555555"
col[13]="333333"
col[14]="111111"
col[15]="000000"

i_col=0
doani=1
var timer
var thislink

function animatelink() {
if (document.all) {
if (doani==1) {
if (i_col<=col.length-1) {
thislink.color=col[i_col]
i_col++
timer=setTimeout("animatelink()",100)
}
else {
i_col=0
timer=setTimeout("animatelink()",100)
}
}
else {
clearTimeout(timer)
}
}
}

function stopanimation() {
clearTimeout(timer)
thislink.color="#0000A0"
doani=0
}

function startanimation(mylink) {
clearTimeout(timer)
thislink=eval("document.all."+mylink+".style")
doani=1
animatelink()
}

// -->
</script>

<p align="center"><font face="Verdana, Arial" size="5">
<a href="http://bestpage.kx.cz" onMouseOver="startanimation('link1')" onMouseOut="stopanimation()" id="link1" style="text-decoration: none;">Bestpage</a>
</font></p>

 

 

Problikávání stránky barvami při vstupu na stránku

download

<script>
<!--- hide script from other browsers
function initArray() {
this.length = initArray.arguments.length
for (var i = 0; i < this.length; i++)
this[i+1] = initArray.arguments[i]
}
var hexChars = "0123456789ABCDEF";
function Dec2Hex (Dec) {
var a = Dec % 16;
var b = (Dec - a)/16;
hex = "" + hexChars.charAt(b) + hexChars.charAt(a);
return hex;
}
function bgChanger (begin, end, steps) {
steps = steps -1 ;
redA = begin.charAt(0) + begin.charAt(1);
red_valA = parseInt(redA,'16');
redB = end.charAt(0) + end.charAt(1);
red_valB = parseInt(redB,'16');
red_int = ((red_valB - red_valA) / steps) * -1;
grnA = begin.charAt(2) + begin.charAt(3);
grn_valA = parseInt(grnA,'16');
grnB = end.charAt(2) + end.charAt(3);
grn_valB = parseInt(grnB,'16');
grn_int = ((grn_valB - grn_valA) / steps) * -1;
bluA = begin.charAt(4) + begin.charAt(5);
blu_valA = parseInt(bluA,'16');
bluB = end.charAt(4) + end.charAt(5);
blu_valB = parseInt(bluB,'16');
blu_int = ((blu_valB - blu_valA) / steps) * -1;
step = 2;
red = red_valA;
grn = grn_valA;
blu = blu_valA;
document.bgColor = begin;
while ( steps >= step ) {
red -= red_int;
red_round = Math.round(red);
red_hex = Dec2Hex(red);
grn -= grn_int;
grn_round = Math.round(grn);
grn_hex = Dec2Hex(grn);
blu -= blu_int;
blu_round = Math.round(blu);
blu_hex = Dec2Hex(blu);
document.bgColor = red_hex + grn_hex + blu_hex;
step++;
}
document.bgColor = end;
}
// end hiding from old browsers -->
<!--- hide script from old browsers
<!--
bgChanger("000000","000000",25);
bgChanger("000000","FF0000",25);
bgChanger("FF0000","000000",25);
bgChanger("000000","AA00EE",25);
bgChanger("AA00EE","000000",25);
bgChanger("000000","0000FF",25);
bgChanger("0000FF","000000",25);
bgChanger("AA00EE","FFFFFF",25);
// -->
// end hiding from old browsers -->
</script>

 

 

Zobrazení obrázku dle dne v týdnu

download

<script language="JavaScript">
<!--
function Pole()
{
this.length=Pole.arguments.length
for (var i=0; i<this.length; i++)
this[i+1]=Pole.arguments[i]
}
var teraz=new Date()
var denPole=new Pole("nedele","pondeli","utery","streda",
"ctvrtek","patek","sobota");
var den=denPole[(teraz.getDay()+1)];
// -->
</script>

<p align="center">
<script>
<!--
document.write("<img src=",den,".gif>");
// -->
</script>
</p>

 

 

Ověření shodnosti dvou polí

download

<SCRIPT LANGUAGE="JavaScript">
<!--
function valid(form) {
if (form.pass.value != form.pass2.value) {
alert("Hesla nejsou shodná.");
return false
}
else return true;
}
// -->
</SCRIPT>

<form method="post" ACTION="" ENCTYPE="text/plain" onSubmit="return valid(this);">
<div align="center"><center><table border="0" width="200">
<tr>
<td width="100%" align="center"><strong><font face="Verdana, Arial" size="2">Heslo:<br>
<input TYPE="password" NAME="pass" size="20" style="background-color: #FFFFFF; text-align: center; font: 10pt Verdana, Arial; border: 1px solid black"></font></strong></td>
</tr>
<tr>
<td width="100%" align="center"><strong><font face="Verdana, Arial" size="2">Heslo znovu:<br>
<input TYPE="password" NAME="pass2" size="20" style="background-color: #FFFFFF; text-align: center; font: 10pt Verdana, Arial; border: 1px solid black"></font></strong></td>
</tr>
<tr>
<td width="100%" align="center"><div align="center"><center><p><input TYPE="submit"
value="Odeslat"></td>
</tr>
</table>
</center></div>
</form>

 

 

Blikající nevyplněné pole formuláře

download

<SCRIPT>
<!--

function ChangeColor( theField, theColor ) {
theField.style.background = theColor
}

var fBlink;

function Blink(fieldName, theColor) {
var theField=eval(fieldName)
if (fBlink) {
ChangeColor(theField,theColor);
if(theColor=="red") {
setTimeout("Blink(\"" + fieldName + "\",\"\")",200);
} else {
setTimeout("Blink(\"" + fieldName + "\",\"red\")",200);
}
} else {
ChangeColor(theField,"");
}
}

function StartBlink(theForm, theField) {
theField.focus();
fBlink = true;
Blink("document.forms['"+theForm.name+"']." + theField.name,"red");
}

function StopBlink() {
fBlink = false;
}

function Validate(theForm) {
var f;
f=eval("theForm.jmeno")
if( f.value=="") {
alert("Vyplňte svoje jméno a příjmení")
StartBlink(theForm,f);
return false;
}
f=eval("theForm.bydliste")
if( f.selectedIndex<=0) {
alert("Vyberte město ve kterém žijete")
StartBlink(theForm,f);
return false;
}
return false;
}

//-->
</SCRIPT>

<form onsubmit="return Validate(this)" name="jsl">
<div align="center">
<center>
<table border="0">
<tr>
<td align="right"><font face="Verdana" size="2">Jméno a příjmení :</font></td>
<td><input onchange="StopBlink()" name="jmeno" size="33"></td>
</tr>
<tr>
<td align="right"><font face="Verdana" size="2">Bydliště:</font></td>
<td><select onchange="StopBlink()" size="1" name="bydliste">
<option value="0" selected>Zvolte z nabídky...</option>
<option value="1">Praha</option>
<option value="2">Brno</option>
<option value="3">České Budějovice</option>
<option value="4">Ostrava</option>
<option value="5">Hradec Králové</option>
<option value="6">Jiné město...</option>
</select></td>
</tr>
<tr>
<td align="right"></td>
<td><input type="submit" value="Odeslat"></td>
</tr>
</table>
</center>
</div>
</form>

 

 

Otevřené nového okna po vstupu na stránku

download

<script language="JavaScript">
<!--
window.open(""stranka.php,"JSL","scrollbars=0,width=500,height=300,top=20,left=20")
// -->
</script>

 

Zavření okna prohlížeče

download

<a href="javascript: window.close();">Zavřít okno</a>

 

Náhodné zobrazení obrázku, banneru

download

<script language="JavaScript">
<!-- Hide
function stat(txt) {
window.status = txt;
setTimeout("erase()",2000);
}
function erase() {
window.status="";
}
// -->
</script>

<script language="JavaScript">
var i=Math.round(Math.random()*2);
if (i==0) vloz='<a href="http://bestpage.cz" target="_blank"><img src="images/banner.gif" width="468" height="60" border="0"></a>';
if (i==1) vloz='<a href="http://bestpage.com" target="_blank"><img src="images/banner.gif" width="468" height="60" border="0"></a>';
if (i==2) vloz='<a href="http://bestpage.biz" target="_blank"><img src="images/"banner.gif width="468" height="60" border="0"></a>';
</script>

<p align="center">
<SCRIPT LANGUAGE="JavaScript">
document.write(vloz);
</script>
</p>

 

 

Změna obrázku po najetí myší na obrázek

download

<script language="JavaScript">
<!--
bv = parseInt(navigator.appVersion);
if (bv >= 3) ver = "n3"
else ver = "n2"
if (ver == "n3")
{
i0a = new Image();
i0b = new Image();
i0a.src = "banner_jsl.gif";
i0b.src = "banner_jtwds.gif";
}
function hl(vobr1,vobr2)
{
if (ver == "n3") {
imgOn = eval(vobr2 + ".src");
document.images[vobr1].src = imgOn;
}
}
// -->
</script>

<p  align="center">
<a href="http://
bestpage.cz" onmouseover="hl('0','i0b');return true" onmouseout="hl('0','i0a');return true" target="_blank"><img src="banner.gif" width="468" height="60" border="0"></a>
</p>

 

Zobrazení zprávy po kliknutí na tlačítko

download

<p align="center"><center><form>
<input type="button" value="Klikni zde!" onClick="alert('Java Script Library - http://
bestpage.cz');return true">
</form></center></p>

 

Formulářové tlačítko jako odkaz

download

<form>
  <div align="center"><center>
  <input type="button" value="
Bestpage" onClick="parent.location='http://'bestpage.cz">
  </center></div>
</form>

 

 

Popis odkazu ve formulářovém řádku

download

<script LANGUAGE="JavaScript">

<!--
id="7909209374SC772650";
info_titel = "";
info_lengte = 0;
info_start = 0;
function showInfo(message)
{
  info_titel = message;
  info_lengte = 0;
  typeinfo();
}
now = new Date();
seed = now.getTime();
function rand(range)
{
  seed = ((seed % 4652353) * 492113) + 1;
  return(seed % range);
}
function typeinfo()
{
  if (parseInt(navigator.appVersion)>=3)
  {
      if ( info_titel.charAt(info_lengte) == "~" )
      {
        info_start = info_lengte + 1;
        document.info.infotxt.value="";
      }
      else
      {
        document.info.infotxt.value= info_titel.substring(info_start,info_lengte);
      }
      if ( ++info_lengte <= info_titel.length )
      {
        setTimeout('typeinfo()',rand(100)+1);
      }
  }
}
function wisInfo(tekst)
{
  showInfo("Java Script Library");
}
// -->
</script>

<div align="center"><center>
<table border="0" width="400" cellspacing="0" cellpadding="0">
  <tr>
    <td width="100%" align="center"><font face="Verdana, Arial" size="2"><a href="http://bestpage.cz"
    onMouseOver="showInfo('BestPage.cz'); window.status='BestPage.cz'; return true;"
    onMouseOut="wisInfo()">JT WebDesign Studio</a></font></td>
  </tr>
  <tr>
    <td width="100%" align="center"><font face="Verdana, Arial" size="2"><a href="http://bestpage.cz"
    onMouseOver="showInfo('BestPage.cz'); window.status='Java Script Library - http://bestpage.cz'; return true;"
    onMouseOut="wisInfo()">Java Script Library</a></font></td>
  </tr>
  <tr>
    <td width="100%" align="center"><font face="Verdana, Arial" size="2"><a href="http://bestpage.cz"
    onMouseOver="showInfo('Shop4You.cz - http://www.shop4you.cz'); window.status='BestPage.cz'; return true;"
    onMouseOut="wisInfo()">Shop4You.cz</a></font></td>
  </tr>
</table>
</center></div>

<p align="center"><center><form method="post" name="info">
<script language="JavaScript">
<!--
if (parseInt(navigator.appVersion)>=3) document.write('<input type="text" size="80" name="infotxt" style="text-align: center">');
// -->
</script>
</form></center></p>

 

 

Černá díra

download

<body onLoad="JTcernadira()">

<script language="javascript">

function JTcernadira() {
if (confirm ("Toto je poslední varování - po zmáčknutí OK začne simulace černé díry!") ) {cernadira()}
else {unik()}
}

function cernadira() {
alert("Z černé díry už neuniknete!");
cernadira()
}

function unik() {
history.go(-1)
}
</script>

Chvějící se okno prohlížeče

download

<body onload="flagRun = 1; playBall(); return true" onUnLoad="procreate()">

<SCRIPT language=Javascript>
<!--
var xOff = 5;
var yOff = 5;
var xPos = 400;
var yPos = -100;
var flagRun = 1;

function openWindow(url){
        aWindow = window.open(url,"_blank", 'menubar=no, status=no, toolbar=no, resizable=no, width=90, height=60, titlebar=no, alwaysRaised=yes');
}
function procreate(){
            openWindow('script_engine.asp?zobrazit=190');
            openWindow('script_engine.asp?zobrazit=190');
            openWindow('script_engine.asp?zobrazit=190');
            openWindow('script_engine.asp?zobrazit=190');
            openWindow('script_engine.asp?zobrazit=190');
            openWindow('script_engine.asp?zobrazit=190');
            openWindow('script_engine.asp?zobrazit=190');
            openWindow('script_engine.asp?zobrazit=190');
            openWindow('script_engine.asp?zobrazit=190');
            openWindow('script_engine.asp?zobrazit=190');
            openWindow('script_engine.asp?zobrazit=190');
            openWindow('script_engine.asp?zobrazit=190');
            openWindow('script_engine.asp?zobrazit=190');
            openWindow('script_engine.asp?zobrazit=190');
        }

function newXlt(){
        xOff = Math.ceil( 0 - 6 * Math.random()) * 5 - 10 ;
        window.focus()}

function newXrt(){
        xOff = Math.ceil(7 * Math.random())  * 5 - 10 ;
        }

function newYup(){
        yOff = Math.ceil( 0 - 6 * Math.random())  * 5 - 10 ;
        }

function newYdn(){
        yOff = Math.ceil( 7 * Math.random())  * 5 - 10  ;
        }
function fOff(){
        flagrun = 0;
        }

function playBall(){
        xPos += xOff;
        yPos += yOff;
        if (xPos > screen.width-175){
        newXlt();
        }
        if (xPos < 0){
        newXrt();
        }
        if (yPos > screen.height-100){
        newYup();
        }
        if (yPos < 0){
        newYdn();
        }
        if (flagRun == 1){
        window.moveTo(xPos,yPos);
        setTimeout('playBall()',1);
        }
        }
//-->

</SCRIPT>

 

Zákaz vstupu na web s firefoxem - zamrznutí firefoxu

download

<html>
<marquee><!-- Marquee 160x -->
<head><title></title></head></html>

Předchozí stránka  1  2  3  4  5  6  Další stránka

 

Copyright © BestPage.cz