Bienvenido(a), Visitante. Favor de ingresar o registrarse.
¿Perdiste tu email de activación?

Ingresar con nombre de usuario, contraseña y duración de la sesión

 
Búsqueda Avanzada

1452 Mensajes en 422 Temas- por 1070 Usuarios - Último usuario: Trancero

12 de Marzo de 2010, 11:16:09 pm
Foro de CodigosWeb.netDesarrollo WebJavascriptJavaScripts
Páginas: [1]   Ir Abajo
  Imprimir  
Autor Tema: JavaScripts  (Leído 2730 veces)
0 Usuarios y 1 Visitante están viendo este tema.
HappyFlox
*
Desconectado Desconectado

Mensajes: 112


Cracking WEP in 16 Minutes :D (Por una red social)


« en: 02 de Octubre de 2006, 07:27:12 am »

Texto en la barra de estado y titulo

Las frases que hemos definido previamente en el JavaScript aparecen a la vez en la barra de estado y en la del título de la página.

Este es el script que puedes seleccionar, copiar y pegar directamente.
El script hay que pegarlo entre las etiquetas HEAD y /HEAD:


<SCRIPT LANGUAGE='JavaScript'>

var default1 = "Consultorio Infrmatico"; // only shown once at page load
var text1 = "Visita nuestros servicios para webmasters";
var text2 = "Si utilizas este JavaScript";
var text3 = "Enlazanos en tu web, Gracias.";
var changeRate = 3000; // 1000 = 1 second
var messageNumber = 0;

function changeStatus() {
  if (messageNumber == 0) {
     window.status=default1;
     document.title=default1;
    }
  else if (messageNumber == 1) {
     window.status=text1;
     document.title=text1;
    }
  else if (messageNumber == 2) {
     window.status=text2;
     document.title=text2;
     }
  else if (messageNumber == 3) {
     window.status=text3;
     document.title=text3;
     messageNumber = 0;
     }

  messageNumber++;
  setTimeout("changeStatus();",changeRate);

}

changeStatus(); // leave here to run right away

// -->
</SCRIPT>

Frases en diagonal

Aparece una frase en la parte izquierda superior de la página en diagonal que cambia de texto cada x segundos. Efecto muy logrado.

Este es el script que puedes seleccionar, copiar y pegar directamente.
Esta parte del script hay que pegarlo entre las etiquetas HEAD y /HEAD:


<SCRIPT language=JavaScript>
<!-- Beginning of JavaScript -
// script trouvé sur http://www.sitecrea.fr.st tout pour votre site
// le réalisateur :
// CREDITS:
// First diagonal textscroller worldwide by Urs Dudli and Peter Gehrig
// Copyright (c) 1999 Peter Gehrig and Urs Dudli. All rights reserved.
// Permission given to use the script provided that this notice remains as is.
// Additional scripts can be found at http://www.24fun.ch.
// info@24fun.ch
// 1/4/2000

// IMPORTANT:
// If you add this script to a script-library or script-archive
// you have to add a link to http://www.24fun.ch on the webpage
// where First diagonal textscroller worldwide will be running.

if (document.layers) {
   alert("Explorer seulement")
}
//vous mettez ci-dessous tout les textes que vous voulez (en rajoutant un nombre aprés "message [")
var message = new Array()
message[0]="AQUI VA UNA FRASE"
message[1]="UN SEGUNDO TEXTO AQUI"
message[2]="PUEDES CONTINUAR"
message[3]="INSERTANDO MAS FRASES"
message[4]="SON ILIMITADAS"
message[5]="SI UTILIZAS ESTE SCRIPT"
message[6]="NO OLVIDES"
message[7]="PONER UN LINK"
message[8]="A CUARTA DINASTIA"
message[9]="EN TU WEB"
message[10]="TE LO AGRADECERIAMOS MUCHO"
message[11]="GRACIAS POR TU VISITA"
message[12]="VUELVE A VISITARNOS"
message[13]="MUCHAS GRACIAS"


var i_message=0

var scrollerheight=250
var scrollerwidth=400

var startheight=0

var font_size=25
var font_family="Times"

var timer

function initiate() {
      document.all.rotationstyle.style.posLeft=-(Math.floor(scrollerwidth/2))+font_size
      document.all.rotationstyle.style.posTop=startheight
        startscroll()
}

function startscroll() {
   if (document.all) {
      do_rotate="yes"
        rotationstyle.filters[0].apply()
      rotationstyle.innerHTML=
      '<OBJECT ID="rotationobj" CLASSID="CLSID:369303C2-D7AC-11d0-89D5-00A0C90833E6" STYLE="position:relative;width:'+scrollerwidth+'px;height:'+2*scrollerheight+'px">'+
        '<PARAM NAME="Line0001" VALUE="SetLineStyle(0)">'+
        '<PARAM NAME="Line0002" VALUE="SetLineColor(0,0,0)">'+
      '<PARAM NAME="Line0003" VALUE="SetFillColor(0,0,0)">'+
      '<PARAM NAME="Line0004" VALUE="SetFont(\''+font_family+'\', '+font_size+', 400, 0, 0, 0)">'+
      '<PARAM NAME="Line0005" VALUE="Text(\''+message[i_message]+'\', 0, 0, 0)">'+
      '</OBJECT>'     
        rotationstyle.filters[0].play()
        rotationobj.Rotate(0,0,-45)
   
        i_message++
        if (i_message>=message.length) {i_message=0}
      timer=setTimeout("startscroll()",4000)
   }
}

function stopscroll() {
   do_rotate="no"
}

// - End of JavaScript - -->
</SCRIPT>

Esta parte del script hay que pegarlo entre las etiquetas BODY y /BODY:

<SPAN id=rotationstyle
style="FILTER: revealTrans(Transition=3, Duration=2); LEFT: -2000px; POSITION: absolute">
<OBJECT classid=CLSID:369303C2-D7AC-11d0-89D5-00A0C90833E6
id=rotationobj></OBJECT></SPAN>

Hay que añadir el siguiente evento onload dentro de la etiqueta BODY:

onload=initiate()

Cambio de color al poner el cursor

Los enlaces cambian de color y se remarcan con una doble línea cuando se pone el cursor sobre ellos.

Este es el script que puedes seleccionar, copiar y pegar directamente.
Esta parte del script hay que pegarlo entre las etiquetas HEAD y /HEAD:


<script>

var coldColor = "#FF0000"
var hotColor  = "#00FF00"
var motionPix = "7"

// do not edit below this line
// ======================================

var a='<style>'+
'A.InstantLink:link {'+
'  color:'+coldColor+';'+
'  text-decoration:none;'+
'  padding:0 '+motionPix+' 0 0;'+
'  }'+ 
'A.InstantLink:visited {'+
'  color:'+coldColor+';'+
'  text-decoration:none;'+
'  padding:0 '+motionPix+' 0 0;}'+ 
'A.InstantLink:active {'+
'  color:'+coldColor+';'+
'  text-decoration:none;'+
'  padding:0 '+motionPix+' 0 0;'+
'  }'+ 
'A.InstantLink:hover {'+
'  color:'+hotColor+';'+
'  text-decoration:underline overline;'+
'  padding:0 0 0 '+motionPix+';'+
'  }'+
'</style>'
if (document.all || document.getElementById){
    document.write(a)
}
</script>

Esta parte del script hay que pegarlo entre las etiquetas BODY y /BODY, donde se quiera que aparezca el efecto:

<table border="0" cellpadding="1" cellspacing="0" bgcolor="#6E6650">
<tr>
<td>
<table border="0" cellpadding="7" cellspacing="0" bgcolor="#141414">
<tr>
<td bgcolor="#141414">
<font face="Arial" size="2" color="#FEDCBA">
<a class="InstantLink" href="http://www.consultorioinformaticos.net">Link 1</a><br>
<img src="spacer.gif" width="5" height="5"><br>
<a class="InstantLink" href="http://www.consultorioinformaticos.net">Link 2</a><br>
<img src="spacer.gif" width="5" height="5"><br>
<a class="InstantLink" href="http://www.consultorioinformaticos.net">Link 3</a><br>
<img src="spacer.gif" width="5" height="5"><br>
<a class="InstantLink" href="http://www.consultorioinformaticos.net">Link 4</a><br>
<img src="spacer.gif" width="5" height="5"><br>
<a class="InstantLink" href="http://www.consultorioinformaticos.net">Link 5</a><br>
<img src="spacer.gif" width="5" height="5"><br>
<a class="InstantLink" href="http://www.consultorioinformaticos.net">Link 6</a><br>
</font>
</td>
</tr>
</table>     
</td>
</tr>
</table>

Links en caja

Cuando pasamos el ratón sobre cada enlace, se abre una caja con los links correspondientes a cada categoría. Muy útil si tienes muchos enlaces.

Este es el script que puedes seleccionar, copiar y pegar directamente.
Esta parte del script hay que pegarlo entre las etiquetas HEAD y /HEAD:


<style>
<!--

.menuskin{
position:absolute;
width:165px;
background-color:menu;
border:2px solid black;
font:normal 12px Verdana;
line-height:18px;
z-index:100;
visibility:hidden;
}

.menuskin a{
text-decoration:none;
color:black;
padding-left:10px;
padding-right:10px;
}

#mouseoverstyle{
background-color:highlight;
}

#mouseoverstyle a{
color:white;
}
-->
</style>

<script language="JavaScript1.2">

//Pop-it menu- By Dynamic Drive
//For full source code and more DHTML scripts, visit http://www.consultorioinformaticos.net
//This credit MUST stay intact for use

var linkset=new Array()
//SPECIFY MENU SETS AND THEIR LINKS. FOLLOW SYNTAX LAID OUT

linkset[0]='<div class="menuitems"><a href="http://www.precios10.com">Ordenadores</a></div>'
linkset[0]+='<div class="menuitems"><a href="http://www.cambiabanners.com">Intercambio de banners</a></div>'
linkset[0]+='<div class="menuitems"><a href="http://www.iaupa.com">Recursos web</a></div>'

linkset[1]='<div class="menuitems"><a href="http://msnbc.com">MSNBC</a></div>'
linkset[1]+='<div class="menuitems"><a href="http://cnn.com">CNN</a></div>'
linkset[1]+='<div class="menuitems"><a href="http://abcnews.com">ABC News</a></div>'
linkset[1]+='<div class="menuitems"><a href="http://www.washingtonpost.com">Washington Post</a></div>'

////No need to edit beyond here

var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1
var ns6=document.getElementById&&!document.all
var ns4=document.layers

function showmenu(e,which){

if (!document.all&&!document.getElementById&&!document.layers)
return

clearhidemenu()

menuobj=ie4? document.all.popmenu : ns6? document.getElementById("popmenu") : ns4? document.popmenu : ""
menuobj.thestyle=(ie4||ns6)? menuobj.style : menuobj

if (ie4||ns6)
menuobj.innerHTML=which
else{
menuobj.document.write('<layer name=gui bgColor=#E6E6E6 width=165 onmouseover="clearhidemenu()" onmouseout="hidemenu()">'+which+'</layer>')
menuobj.document.close()
}

menuobj.contentwidth=(ie4||ns6)? menuobj.offsetWidth : menuobj.document.gui.document.width
menuobj.contentheight=(ie4||ns6)? menuobj.offsetHeight : menuobj.document.gui.document.height
eventX=ie4? event.clientX : ns6? e.clientX : e.x
eventY=ie4? event.clientY : ns6? e.clientY : e.y

//Find out how close the mouse is to the corner of the window
var rightedge=ie4? document.body.clientWidth-eventX : window.innerWidth-eventX
var bottomedge=ie4? document.body.clientHeight-eventY : window.innerHeight-eventY

//if the horizontal distance isn't enough to accomodate the width of the context menu
if (rightedge<menuobj.contentwidth)
//move the horizontal position of the menu to the left by it's width
menuobj.thestyle.left=ie4? document.body.scrollLeft+eventX-menuobj.contentwidth : ns6? window.pageXOffset+eventX-menuobj.contentwidth : eventX-menuobj.contentwidth
else
//position the horizontal position of the menu where the mouse was clicked
menuobj.thestyle.left=ie4? document.body.scrollLeft+eventX : ns6? window.pageXOffset+eventX : eventX

//same concept with the vertical position
if (bottomedge<menuobj.contentheight)
menuobj.thestyle.top=ie4? document.body.scrollTop+eventY-menuobj.contentheight : ns6? window.pageYOffset+eventY-menuobj.contentheight : eventY-menuobj.contentheight
else
menuobj.thestyle.top=ie4? document.body.scrollTop+event.clientY : ns6? window.pageYOffset+eventY : eventY
menuobj.thestyle.visibility="visible"
return false
}

function contains_ns6(a, b) {
//Determines if 1 element in contained in another- by Brainjar.com
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function hidemenu(){
if (window.menuobj)
menuobj.thestyle.visibility=(ie4||ns6)? "hidden" : "hide"
}

function dynamichide(e){
if (ie4&&!menuobj.contains(e.toElement))
hidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
hidemenu()
}

function delayhidemenu(){
if (ie4||ns6||ns4)
delayhide=setTimeout("hidemenu()",500)
}

function clearhidemenu(){
if (window.delayhide)
clearTimeout(delayhide)
}

function highlightmenu(e,state){
if (document.all)
source_el=event.srcElement
else if (document.getElementById)
source_el=e.target
if (source_el.className=="menuitems"){
source_el.id=(state=="on")? "mouseoverstyle" : ""
}
else{
while(source_el.id!="popmenu"){
source_el=document.getElementById? source_el.parentNode : source_el.parentElement
if (source_el.className=="menuitems"){
source_el.id=(state=="on")? "mouseoverstyle" : ""
}
}
}
}

if (ie4||ns6)
document.onclick=hidemenu

</script>

Esta parte del script hay que pegarlo entre las etiquetas BODY y /BODY, donde se quiera que aparezca el efecto:

<div id="popmenu" class="menuskin" onMouseover="clearhidemenu();highlightmenu(event,'on')" onMouseout="highlightmenu(event,'off');dynamichide(event)">
</div>

<a href="#" onMouseover="showmenu(event,linkset[0])" onMouseout="delayhidemenu()">Enlaces 1</a><br>
<a href="#" onMouseover="showmenu(event,linkset[1])" onMouseout="delayhidemenu()">Enlaces 2</a>

Hay que añadir el siguiente evento onload dentro de la etiqueta BODY:

onload=songticker()
En línea
Foro de CodigosWeb.net
« en: 02 de Octubre de 2006, 07:27:12 am »

 En línea
HappyFlox
*
Desconectado Desconectado

Mensajes: 112


Cracking WEP in 16 Minutes :D (Por una red social)


« Respuesta #1 en: 02 de Octubre de 2006, 07:27:44 am »

Movimiento sombra

La sombra que produce el texto escrito se mueve hacia todas las posiciones. Efecto muy llamativo para tu web.

Este es el script que puedes seleccionar, copiar y pegar directamente.
Esta parte del script hay que pegarlo entre las etiquetas HEAD y /HEAD:


<SCRIPT LANGUAGE="JavaScript">

function ShadowWave()
   {
   if(document.getElementById && window.print)
      {
      var dir=Math.random();
      if (dir<.1) {dir=90}
      if (dir<.37) {dir=45}
      if (dir<.64) {dir=315}
      if (dir<.74) {dir=270}
      if (dir<2) {dir=0}
      document.getElementById("ejs_brouille").style.filter="shadow(color=#ffe4d2,direction="+dir+",enabled=1)";
      }
   }
</SCRIPT>
<!-- FIN DU SCRIPT -->

Esta parte del script hay que pegarlo entre las etiquetas BODY y /BODY, donde se quiera que aparezca el efecto:

<DIV ID="ejs_brouille" STYLE="HEIGHT:2">Cuarta Diinastía<BR>Siempre hay una primera vez.</DIV>
<SCRIPT LANGUAGE=JavaScript>
setInterval("ShadowWave()",50);
</SCRIPT>

Reloj sigue al cursor

Aparece un reloj con manecillas y la fecha girando a su alrededor. Cuando movemos el cursor el reloj lo sigue descomponiéndose y volviendo a componerse una vez paramos el cursor.

Este es el script que puedes seleccionar, copiar y pegar directamente.
El script hay que pegarlo entre las etiquetas BODY y /BODY:


<SCRIPT language=JavaScript>
dCol='ffffff';//date colour.
fCol='00ffff';//face colour.
sCol='ffffff';//seconds colour.
mCol='ccff00';//minutes colour.
hCol='ffff00';//hours colour.
ClockHeight=40;
ClockWidth=40;
ClockFromMouseY=0;
ClockFromMouseX=100;

//Alter nothing below! Alignments will be lost!

d=new Array("DOMINGO","LUNES","MARTES","MIERCOLES","JUEVES","VIERNES","SABADO");
m=new Array("ENERO","FEBRERO","MARZO","ABRIL","MAYO","JUNIO","JULIO","AGOSTO","SEPTIEMBRE","OCTUBRE","NOVIEMBRE","DICIEMBRE");
date=new Date();
day=date.getDate();
year=date.getYear();
if (year < 2000) year=year+1900;
TodaysDate=" "+d[date.getDay()]+" "+day+" "+m[date.getMonth()]+" "+year;
D=TodaysDate.split('');
H='...';
H=H.split('');
M='....';
M=M.split('');
S='.....';
S=S.split('');
Face='1 2 3 4 5 6 7 8 9 10 11 12';
font='Arial';
size=1;
speed=0.6;
ns=(document.layers);
ie=(document.all);
Face=Face.split(' ');
n=Face.length;
a=size*10;
ymouse=0;
xmouse=0;
scrll=0;
props="<font face="+font+" size="+size+" color="+fCol+"><B>";
props2="<font face="+font+" size="+size+" color="+dCol+"><B>";
Split=360/n;
Dsplit=360/D.length;
HandHeight=ClockHeight/4.5
HandWidth=ClockWidth/4.5
HandY=-7;
HandX=-2.5;
scrll=0;
step=0.06;
currStep=0;
y=new Array();x=new Array();Y=new Array();X=new Array();
for (i=0; i < n; i++){y=0;x=0;Y=0;X=0}
Dy=new Array();Dx=new Array();DY=new Array();DX=new Array();
for (i=0; i < D.length; i++){Dy=0;Dx=0;DY=0;DX=0}
if (ns){
for (i=0; i < D.length; i++)
document.write('<layer name="nsDate'+i+'" top=0 left=0 height='+a+' width='+a+'><center>'+props2+D+'</font></center></layer>');
for (i=0; i < n; i++)
document.write('<layer name="nsFace'+i+'" top=0 left=0 height='+a+' width='+a+'><center>'+props+Face+'</font></center></layer>');
for (i=0; i < S.length; i++)
document.write('<layer name=nsSeconds'+i+' top=0 left=0 width=15 height=15><font face=Arial size=3 color='+sCol+'><center><b>'+S+'</b></center></font></layer>');
for (i=0; i < M.length; i++)
document.write('<layer name=nsMinutes'+i+' top=0 left=0 width=15 height=15><font face=Arial size=3 color='+mCol+'><center><b>'+M+'</b></center></font></layer>');
for (i=0; i < H.length; i++)
document.write('<layer name=nsHours'+i+' top=0 left=0 width=15 height=15><font face=Arial size=3 color='+hCol+'><center><b>'+H+'</b></center></font></layer>');
}
if (ie){
document.write('<div id="Od" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < D.length; i++)
document.write('<div id="ieDate" style="position:absolute;top:0px;left:0;height:'+a+';width:'+a+';text-align:center">'+props2+D+'</B></font></div>');
document.write('</div></div>');
document.write('<div id="Of" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < n; i++)
document.write('<div id="ieFace" style="position:absolute;top:0px;left:0;height:'+a+';width:'+a+';text-align:center">'+props+Face+'</B></font></div>');
document.write('</div></div>');
document.write('<div id="Oh" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < H.length; i++)
document.write('<div id="ieHours" style="position:absolute;width:16px;height:16px;font-family:Arial;font-size:16px;color:'+hCol+';text-align:center;font-weight:bold">'+H+'</div>');
document.write('</div></div>');
document.write('<div id="Om" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < M.length; i++)
document.write('<div id="ieMinutes" style="position:absolute;width:16px;height:16px;font-family:Arial;font-size:16px;color:'+mCol+';text-align:center;font-weight:bold">'+M+'</div>');
document.write('</div></div>')
document.write('<div id="Os" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < S.length; i++)
document.write('<div id="ieSeconds" style="position:absolute;width:16px;height:16px;font-family:Arial;font-size:16px;color:'+sCol+';text-align:center;font-weight:bold">'+S+'</div>');
document.write('</div></div>')
}
(ns)?window.captureEvents(Event.MOUSEMOVE):0;
function Mouse(evnt){
ymouse = (ns)?evnt.pageY+ClockFromMouseY-(window.pageYOffset):event.y+ClockFromMouseY;
xmouse = (ns)?evnt.pageX+ClockFromMouseX:event.x+ClockFromMouseX;
}
(ns)?window.onMouseMove=Mouse:document.onmousemove=Mouse;
function ClockAndAssign(){
time = new Date ();
secs = time.getSeconds();
sec = -1.57 + Math.PI * secs/30;
mins = time.getMinutes();
min = -1.57 + Math.PI * mins/30;
hr = time.getHours();
hrs = -1.575 + Math.PI * hr/6+Math.PI*parseInt(time.getMinutes())/360;
if (ie){
Od.style.top=window.document.body.scrollTop;
Of.style.top=window.document.body.scrollTop;
Oh.style.top=window.document.body.scrollTop;
Om.style.top=window.document.body.scrollTop;
Os.style.top=window.document.body.scrollTop;
}
for (i=0; i < n; i++){
 var F=(ns)?document.layers['nsFace'+i]:ieFace.style;
 F.top=y + ClockHeight*Math.sin(-1.0471 + i*Split*Math.PI/180)+scrll;
 F.left=x + ClockWidth*Math.cos(-1.0471 + i*Split*Math.PI/180);
 }
for (i=0; i < H.length; i++){
 var HL=(ns)?document.layers['nsHours'+i]:ieHours.style;
 HL.top=y+HandY+(i*HandHeight)*Math.sin(hrs)+scrll;
 HL.left=x+HandX+(i*HandWidth)*Math.cos(hrs);
 }
for (i=0; i < M.length; i++){
 var ML=(ns)?document.layers['nsMinutes'+i]:ieMinutes.style;
 ML.top=y+HandY+(i*HandHeight)*Math.sin(min)+scrll;
 ML.left=x+HandX+(i*HandWidth)*Math.cos(min);
 }
for (i=0; i < S.length; i++){
 var SL=(ns)?document.layers['nsSeconds'+i]:ieSeconds.style;
 SL.top=y+HandY+(i*HandHeight)*Math.sin(sec)+scrll;
 SL.left=x+HandX+(i*HandWidth)*Math.cos(sec);
 }
for (i=0; i < D.length; i++){
 var DL=(ns)?document.layers['nsDate'+i]:ieDate.style;
 DL.top=Dy + ClockHeight*1.5*Math.sin(currStep+i*Dsplit*Math.PI/180)+scrll;
 DL.left=Dx + ClockWidth*1.5*Math.cos(currStep+i*Dsplit*Math.PI/180);
 }
currStep-=step;
}
function Delay(){
scrll=(ns)?window.pageYOffset:0;
Dy[0]=Math.round(DY[0]+=((ymouse)-DY[0])*speed);
Dx[0]=Math.round(DX[0]+=((xmouse)-DX[0])*speed);
for (i=1; i < D.length; i++){
Dy=Math.round(DY+=(Dy[i-1]-DY)*speed);
Dx=Math.round(DX+=(Dx[i-1]-DX)*speed);
}
y[0]=Math.round(Y[0]+=((ymouse)-Y[0])*speed);
x[0]=Math.round(X[0]+=((xmouse)-X[0])*speed);
for (i=1; i < n; i++){
y=Math.round(Y+=(y[i-1]-Y)*speed);
x=Math.round(X+=(x[i-1]-X)*speed);
}
ClockAndAssign();
setTimeout('Delay()',20);
}
if (ns||ie)window.onload=Delay;
</SCRIPT>

Texto segun la hora y el día

Dependiendo de la hora que marque el ordenador aparecerá una frase definida por el webmaster.

Este es el script que puedes seleccionar, copiar y pegar directamente.
El script hay que pegarlo entre las etiquetas BODY y /BODY, donde se quiera que aparezca el efecto:


<script LANGUAGE="JavaScript">
   var dt = new Date();
   var hr = dt.getHours();
   var msg = ((hr<12) ? "Buenos dias" :"Buenas Noches");
   msg = ((hr>11)&&(hr<19) ? "Buenas Tardes" : msg);
   msg=" <H2> "+msg+" !</H2>";
   document.write(msg);
</script>

Texto sirena

Las letras del texto se iluminan de izquierda a derecha de forma semejante a la sirena de un coche de policía.

Este es el script que puedes seleccionar, copiar y pegar directamente.
Esta parte del script hay que pegarlo entre las etiquetas HEAD y /HEAD:


<script>
mesk=new Array();mesk[10]="A";mesk[11]="B";mesk[12]="C";mesk[13]="D";mesk[14]="E";mesk[15]="F";A=10;B=11;C=12;D=13;E=14;F=15;let="ABCDEF";function mes(num){if(let.indexOf(num) != -1){return eval(num)};else{if(num < 10){return eval(num)};else{return mesk[num]}}};

function color(begin,einde,stappen,stap){
hh1=(mes(begin.charAt(0))*16)+mes(begin.charAt(1));
hh2=(mes(begin.charAt(2))*16)+mes(begin.charAt(3));
hh3=(mes(begin.charAt(4))*16)+mes(begin.charAt(5));
pp1=(mes(einde.charAt(0))*16)+mes(einde.charAt(1));
pp2=(mes(einde.charAt(2))*16)+mes(einde.charAt(3));
pp3=(mes(einde.charAt(4))*16)+mes(einde.charAt(5));

if(hh1 < pp1){ff1=hh1+Math.floor((pp1-hh1)/stappen*stap);
ff1=eval("\'"+mes(Math.floor(ff1/16))+"\'")+eval("\'"+mes(ff1-(Math.floor(ff1/16)*16))+"\'");}
;else{ff1=hh1-Math.floor((hh1-pp1)/stappen*stap);
ff1=eval("\'"+mes(Math.floor(ff1/16))+"\'")+eval("\'"+mes(ff1-(Math.floor(ff1/16)*16))+"\'");}
if(hh2 < pp2){ff2=hh2+Math.floor((pp2-hh2)/stappen*stap);
ff2=eval("\'"+mes(Math.floor(ff2/16))+"\'")+eval("\'"+mes(ff2-(Math.floor(ff2/16)*16))+"\'");}
;else{ff2=hh2-Math.floor((hh2-pp2)/stappen*stap);
ff2=eval("\'"+mes(Math.floor(ff2/16))+"\'")+eval("\'"+mes(ff2-(Math.floor(ff2/16)*16))+"\'");}
if(hh3 < pp3){ff3=hh3+Math.floor((pp3-hh3)/stappen*stap);
ff3=eval("\'"+mes(Math.floor(ff3/16))+"\'")+eval("\'"+mes(ff3-(Math.floor(ff3/16)*16))+"\'");}
;else{ff3=hh3-Math.floor((hh3-pp3)/stappen*stap);
ff3=eval("\'"+mes(Math.floor(ff3/16))+"\'")+eval("\'"+mes(ff3-(Math.floor(ff3/16)*16))+"\'");}
;return ff1+ff2+ff3}
bum=0;bum2=0;txt=new Array();txt[0]="";function lightf(){
for(i=0;i != Math.floor(message.length/2);i++){txt=color(lightcolor1,lightcolor2,Math.floor(message.length/2),i)};
for(i=Math.floor(message.length/2);i != message.length;i++){txt=color(lightcolor2,lightcolor1,Math.floor(message.length/2),(i-Math.floor(message.length/2)))};
lightf1()}
function lightf1(){txt[message.length+1]="";bum2=message.length-bum;for(i=0;i != message.length;i++){if(i+bum < message.length){txt[message.length+1]=txt[message.length+1]+"<font color='#"+txt[(i+bum)]+"'>"+message.charAt(i)+"</font>"};else{txt[message.length+1]=txt[message.length+1]+"<font color='#"+txt[i-bum2]+"'>"+message.charAt(i)+"</font>"
}};if(bum != message.length){bum++;};else{bum=0};light.innerHTML=txt[message.length+1];setTimeout("lightf1()",50)}
</script>

Esta parte del script hay que pegarlo entre las etiquetas BODY y /BODY, donde se quiera que aparezca el efecto:

<h1><div id="light"></div></h1>

<script>
lightcolor1="FF0000" // use capital letters
lightcolor2="000000" // use capital letters
message="AQUI EL TEXTO"
lightf()
</script>

Cambiar imagen con un click

Cuando se hace click sobre la imagen, esta cambia por otra.

Este es el script que puedes seleccionar, copiar y pegar directamente.
Esta parte del script hay que pegarlo entre las etiquetas HEAD y /HEAD:


<script language="javascript">

imagen1=new Image
imagen1.src="img014.gif"
imagen2=new Image
imagen2.src="img025.gif"

var i=1;

function cambiar() {                       
   if (i == 1)
      {
      document.images['ejemplo'].src=imagen2.src
      i=2;
      }
   else
      {
      document.images['ejemplo'].src=imagen1.src;
      i=1;
      }
   }

</script>

Esta parte del script hay que pegarlo entre las etiquetas BODY y /BODY, donde se quiera que aparezca el efecto:

<img src="img.gif" name="ejemplo" onMousedown="cambiar()">

Cambiar imagen automaticamete

Cada imagen cambia por otra automáticamente cuando se pasa el cursor del ratón por encima.

Este es el script que puedes seleccionar, copiar y pegar directamente.
Esta parte del script hay que pegarlo entre las etiquetas HEAD y /HEAD:


<SCRIPT LANGUAGE="Javascript">

<!-- Swap images
function Permut (flag,img) {
   if (document.images) {
        if (document.images[img].permloaded) {
            if (flag==1) document.images[img].src = document.images[img].perm.src
            else document.images[img].src = document.images[img].perm.oldsrc
        }
   }
}
function preloadPermut (img,adresse) {
   if (document.images) {
        img.onload = null;
        img.perm = new Image ();
        img.perm.oldsrc = img.src;
        img.perm.src = adresse;
        img.permloaded = true;
   }
}
// -->
</SCRIPT>

Esta parte del script hay que pegarlo entre las etiquetas BODY y /BODY, donde se quiera que aparezca el efecto:

<A HREF="intercambio.html" TARGET="_BLANK" onMouseover="Permut(1,'IMG1');" onMouseout="Permut(0,'IMG1');">
<IMG SRC="imagen.gif" border=0 NAME="IMG1" onLoad="preloadPermut(this,'imagen3.gif');" ></A>
En línea
HappyFlox
*
Desconectado Desconectado

Mensajes: 112


Cracking WEP in 16 Minutes :D (Por una red social)


« Respuesta #2 en: 02 de Octubre de 2006, 07:28:16 am »

una "pequeña" recopilacion que hice hace un tiempo para otro foro......

Envío de SMS Gratis para tu web / foro (html)
Código:
<IFRAME FRAMEBORDER=0 WIDTH=450 HEIGHT=330 NAME="_top" SCROLLING=no SRC="http://masresultados.com/scripts/44215990909.htm"></IFRAME>

Hosting de Imagenes (powered by www.mihalism.com)
Código:
<center><iframe src="http://www.mihalism.com/iframe.php?txtcolor=111111&type=blank&size=30" scrolling="no" allowtransparency="true" frameborder="0" width="800" height="400">Browser not suitable for Mihaism Images.</iframe></center>

Menú Expandible [ guia en ingles ]

POP-UP para tu web

Calculadora Científica en tu WEBSITE
Código:
<!-- w w w . f o r o a b s . t k -->

<HTML>
<HEAD>

<!-- Código descargado gratuitamente de Elite Pirata, website de piratas.
                                   http://www.elitepirata.com -->

<TITLE>Ejemplos Javascript: ejemplo práctico </TITLE>

<script language=javascript>


//<!--

 // Javascript scientific calculator  (4 March 1996)

 // (C) Copyright Rolf Howarth 1996

 // rolf@insect.demon.co.uk

 

 var NDIGITS = 16;

 var STACKSIZE = 12;

 

 var value = 0;         // current value in display

 var memory = GetCookie("CalcMemory");  // current value in memory

 if (!memory) memory = 0;

 var level = 0;         // no. of items on stack

 var entered = true;    // has value on display been 'entered'?

 var decimal = 0;               // multiplier when entering after decimal point

 var fixed = 0;         // force trailing zero display when entering decimals

 var exponent = false;  // currently entering exponent?

 var inverse = false;   // has the INV key been pressed?

 

 if (location.search)

 {

        // pass in value through command line

        value = location.search.substring(1,location.search.length);

 }

 

 function stackItem()

 {

        this.value = 0;

        this.op = "";

 }

 

 function array(length)

 {

        this[0] = 0;

        for (i=0; i<length; ++i)

        {

                this[i] = 0;

                this[i] = new stackItem();

        }

        this.length = length;

 }

 

 stack = new array(STACKSIZE);

 

 function push(value,op,prec)

 {

        if (level==STACKSIZE)

                return false;

        for (i=level;i>0; --i)

        {

                stack[i].value = stack[i-1].value;

                stack[i].op = stack[i-1].op;

                stack[i].prec = stack[i-1].prec;

        }

        stack[0].value = value;

        stack[0].op = op;

        stack[0].prec = prec;

        ++level;

        return true;

}



function pop()

{

        if (level==0)

                return false;

        for (i=0;i<level; ++i)

        {

                stack[i].value = stack[i+1].value;

                stack[i].op = stack[i+1].op;

                stack[i].prec = stack[i+1].prec;

        }

        --level;

        return true;

 }

 

 function format(value)

 {

        var valStr = "" + value;

        if (valStr.indexOf("N")>=0 || (value == 2*value && value == 1+value))

                return "Error ";

        var i = valStr.indexOf("e")

        if (i>=0)

        {

                var expStr = valStr.substring(i+1,valStr.length);

                if (i>11) i=11;  // max 11 digits

                valStr = valStr.substring(0,i);

                if (valStr.indexOf(".")<0) valStr += ".";

                valStr += " " + expStr;

        }

        else

        {

                var valNeg = false;

                if (value < 0)

                        { value = -value; valNeg = true; }


                var valInt = Math.floor(value);

                var valFrac = value - valInt;

                var prec = NDIGITS - (""+valInt).length - 1;    // how many digits available after period

                if (! entered && fixed>0)

                        prec = fixed;

                var mult = " 1000000000000000000".substring(1,prec+2);

                var frac = Math.floor(valFrac * mult + 0.5);


                valInt = Math.floor(Math.floor(value * mult + .5) / mult);


                if (valNeg)


                        valStr = "-" + valInt;


                else


                        valStr = "" + valInt;


                var fracStr = "00000000000000"+frac;

                fracStr = fracStr.substring(fracStr.length-prec, fracStr.length);

                i = fracStr.length-1;

                if (entered || fixed==0)

                {

                        // remove trailing zeros unless fixed during entry.

                        while (i>=0 && fracStr.charAt(i)=="0")

                                --i;

                        fracStr = fracStr.substring(0,i+1);

                }

                if (i>=0) valStr += "." + fracStr;

//              document.result.debugField.value = "prec "+prec+", mult "+mult+", frac "+frac;

        }

        return valStr;

}



function refresh()

{

        var display = format(value);

        if (exponent)

        {

                if (expval<0)

                        display += " " + expval;

                else

                        display += " +" + expval;

        }

        if (display.indexOf(".")<0 && display != "Error ")

        {

                if (entered || decimal>0)

                        display += '.';

                else

                        display += ' ';

        }

        display = "               " + display;

        display = display.substring(display.length-NDIGITS-1,display.length);

        document.result.result.value = display;

        inverse = false;

}



function clearAll()

{

        level = 0;

        clear();

}



function clear()

{

        exponent = false;

        value = 0;

        enter();

        refresh();

}



function evalx()

{

        if (level==0)

                return false;

        op = stack[0].op;

        sval = stack[0].value;

//      alert("eval "+sval+op+value);

        if (op == "+")

                value = sval + value;

        else if (op == '-')

                value = sval - value;

        else if (op == '*')

                value = sval * value;

        else if (op == '/')

                value = sval / value;

        else if (op == 'pow')

                value = Math.pow(sval,value);

        pop();

        if (op=='(')

                return false;

        return true;

}



function openp()

{

        enter();

        if (!push(0,'(',0))

        {

                value = "NAN";

        }

        refresh();

}



function closep()

{

        enter();

        while (evalx())

               ;

        refresh();

}



function operator(op)

{

        enter();

        if (op=='+' || op=='-')

                prec = 1;

        else if (op=='*' || op=='/')

                prec = 2;

        else if (op=="pow")

                prec = 3;

        if (level>0 && prec <= stack[0].prec)

                evalx();

        if (!push(value,op,prec))

        {

                value = "NAN";

        }

        refresh();

 }

 

 function enter()

 {

        if (exponent)

                value = value * Math.exp(expval * Math.LN10);

        entered = true;

        exponent = false;

        decimal = 0;

        fixed = 0;

 }

 

 function equals()

 {

        enter()

        while (level>0)

                evalx();

        refresh();

}



function digit(n)

{

        if (entered)

        {

                value = 0;

                digits = 0;

                entered = false;


        }


        if (n==0 && digits==0)


        {


                refresh();


                return;


        }


        if (exponent)

        {

                if (expval<0)

                        n = -n;

                if (digits < 3)

                {

                        expval = expval * 10 + n;

                        ++digits;

                        refresh();

                }

                return;

        }

        if (value<0)

                n = -n;

        if (digits < NDIGITS-1)

        {

                ++digits;

                if (decimal>0)

                {

                        decimal = decimal * 10;

                        value = value + (n/decimal);

                        ++fixed;

                }

                else

                        value = value * 10 + n;

        }

        refresh();

}



function sign()

{

        if (exponent)

                expval = -expval;

        else

                value = -value;

        refresh();

}



function period()

{

        if (entered)

        {

                value = 0;

                digits = 1;

        }

        entered = false;

        if (decimal == 0)

        {

                decimal = 1;

        }

        refresh();

}



function exp()

{

        if (entered || exponent)

                return;

        exponent = true;

        expval = 0;

        digits = 0;

        decimal = 0;

        refresh();

}



function inv()

{

        inverse = !inverse;

}



function func(f)

{

        enter();

        if (f=="1/x")

                value = 1/value;

        else if (f=="swap")

        {

                var tmp = value;

                value = stack[0].value;

                stack[0].value = tmp;

        }

        else if (f=='n!')

        {

                if (value<0 || value>200 || value != Math.round(value))

                        value = "NAN";

                else

                {

                        var n = 1;

                        var i;

                        for (i=1;i<=value;++i)

                                n *= i;

                        value = n;

                }

        }

        else if (f=="MR")

                value = memory;

        else if (f=="M+")

        {

                memory += value;

                SetCookie("CalcMemory", memory);

        }

        else if (f=="Min")

        {

                memory = value;

                SetCookie("CalcMemory", memory);

        }

        else if (inverse)

        {

                if (f=="sin")

                        value = Math.asin(value)*180/Math.PI;

                else if (f=="cos")

                        value = Math.acos(value)*180/Math.PI;

                else if (f=="tan")

                        value = Math.atan(value)*180/Math.PI;

                else if (f=="log")

                        value = Math.exp(value * Math.LN10);

                else if (f=="log2")

                        value = Math.exp(value * Math.LN2);

                else if (f=="ln")

                        value = Math.exp(value);

                else if (f=="sqrt")

                        value = value*value;

                else if (f=="pi")

                        value = Math.E;

        }

        else

        {

                if (f=="sin")

                        value = Math.sin(value/180 * Math.PI);

                else if (f=="cos")

                        value = Math.cos(value/180 * Math.PI);

                else if (f=="tan")

                        value = Math.tan(value/180 * Math.PI);

                else if (f=="log")

                        value = Math.log(value)/Math.LN10;

                else if (f=="log2")

                        value = Math.log(value)/Math.LN2;

                else if (f=="ln")

                        value = Math.log(value);

                else if (f=="sqrt")

                        value = Math.sqrt(value);

                else if (f=="pi")

                        value = Math.PI;

        }

        refresh();

 }

 

 function hex()

 {

        location = "js-hcalc.htm?"+value;

 }

 

 /////////////

 //

 //  Cookie Functions - Second Helping  (21-Jan-96)

 //  Written by:  Bill Dortch, hIdaho Design <bdortch@netw.com>

//  The following functions are released to the public domain.

//



function getCookieVal (offset) {

  var endstr = document.cookie.indexOf (";", offset);

  if (endstr == -1)

    endstr = document.cookie.length;

  return unescape(document.cookie.substring(offset, endstr));

}



function GetCookie (name) {

  var arg = name + "=";

  var alen = arg.length;

  var clen = document.cookie.length;

  var i = 0;

  while (i < clen) {

     var j = i + alen;

     if (document.cookie.substring(i, j) == arg)

       return getCookieVal (j);

     i = document.cookie.indexOf(" ", i) + 1;

     if (i == 0) break;

   }

   return null;

 }

 

 //  Function to create or update a cookie.

 //    name - String object object containing the cookie name.

 //    value - String object containing the cookie value.  May contain

 //      any valid string characters.

 //    [expires] - Date object containing the expiration data of the cookie.  If

 //      omitted or null, expires the cookie at the end of the current session.

 //    [path] - String object indicating the path for which the cookie is valid.

 //      If omitted or null, uses the path of the calling document.

 //    [domain] - String object indicating the domain for which the cookie is

 //      valid.  If omitted or null, uses the domain of the calling document.

 //    [secure] - Boolean (true/false) value indicating whether cookie transmission

 //      requires a secure channel (HTTPS). 

 //

 function SetCookie (name, value) {

   var argv = SetCookie.arguments;

   var argc = SetCookie.arguments.length;

   var expires = (argc > 2) ? argv[2] : null;

  var path = (argc > 3) ? argv[3] : null;

  var domain = (argc > 4) ? argv[4] : null;

  var secure = (argc > 5) ? argv[5] : false;

  document.cookie = name + "=" + escape (value) +

    ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +

    ((path == null) ? "" : ("; path=" + path)) +

    ((domain == null) ? "" : ("; domain=" + domain)) +

    ((secure == true) ? "; secure" : "");

}



function DeleteCookie (name) {

  var exp = new Date();

  exp.setTime (exp.getTime() - 1);  // This cookie is history

  var cval = GetCookie (name);

  document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();

}



//

// End of cookie functions

//////////



// -->


</script>


</HEAD>

<BODY bgcolor="white" onLoad="refresh()">


<center>

<FORM name=result>

 <INPUT size=18 name=result onFocus="refresh(); this.blur();">

</FORM>

<IMG SRC="scalc.gif" width=159 height=224 usemap="#map" border=0>

<MAP name="map">

<AREA SHAPE=rect HREF="javascript:digit(0)" COORDS="12,191,32,209">

<AREA SHAPE=rect HREF="javascript:period()" COORDS="40,191,60,209">

<AREA SHAPE=rect HREF="javascript:exp()"    COORDS="68,191,88,209">

<AREA SHAPE=rect HREF="javascript:sign()"   COORDS="96,191,116,209">

<AREA SHAPE=rect HREF="javascript:equals()" COORDS="124,191,144,209">



<AREA SHAPE=rect HREF="javascript:digit(1)" COORDS="12,166,32,184">

<AREA SHAPE=rect HREF="javascript:digit(2)" COORDS="40,166,60,184">

<AREA SHAPE=rect HREF="javascript:digit(3)" COORDS="68,166,88,184">

<AREA SHAPE=rect HREF="javascript:operator('+')"  COORDS="96,166,116,184">

<AREA SHAPE=rect HREF="javascript:operator('-')"  COORDS="124,166,144,184">



<AREA SHAPE=rect HREF="javascript:digit(4)" COORDS="12,141,32,159">

<AREA SHAPE=rect HREF="javascript:digit(5)" COORDS="40,141,60,159">

<AREA SHAPE=rect HREF="javascript:digit(6)" COORDS="68,141,88,159">

<AREA SHAPE=rect HREF="javascript:operator('*')"  COORDS="96,141,116,159">

<AREA SHAPE=rect HREF="javascript:operator('/')"  COORDS="124,141,144,159">



<AREA SHAPE=rect HREF="javascript:digit(7)" COORDS="12,116,32,134">

<AREA SHAPE=rect HREF="javascript:digit(8)" COORDS="40,116,60,134">

<AREA SHAPE=rect HREF="javascript:digit(9)" COORDS="68,116,88,134">

<AREA SHAPE=rect HREF="javascript:clear()"  COORDS="96,116,116,134">

<AREA SHAPE=rect HREF="javascript:clearAll()"  COORDS="124,116,144,134">



<AREA SHAPE=rect HREF="javascript:openp()"     COORDS="12,90,32,104">

<AREA SHAPE=rect HREF="javascript:closep()"    COORDS="40,90,60,104">

<AREA SHAPE=rect HREF="javascript:func('Min')" COORDS="68,90,88,104">

<AREA SHAPE=rect HREF="javascript:func('MR')"  COORDS="96,90,116,104">

<AREA SHAPE=rect HREF="javascript:func('M+')"  COORDS="124,90,144,104">



<AREA SHAPE=rect HREF="javascript:operator('pow')"  COORDS="12,65,32,79">

<AREA SHAPE=rect HREF="javascript:func('n!')"   COORDS="40,65,60,79">

<AREA SHAPE=rect HREF="javascript:func('sqrt')" COORDS="68,65,88,79">

<AREA SHAPE=rect HREF="javascript:func('1/x')"  COORDS="96,65,116,79">

<AREA SHAPE=rect HREF="javascript:func('swap')" COORDS="124,65,144,79">



<AREA SHAPE=rect HREF="javascript:inv()"        COORDS="12,40,32,54">

<AREA SHAPE=rect HREF="javascript:func('sin')"  COORDS="40,40,60,54">

<AREA SHAPE=rect HREF="javascript:func('cos')"  COORDS="68,40,88,54">

<AREA SHAPE=rect HREF="javascript:func('tan')"  COORDS="96,40,116,54">

<AREA SHAPE=rect HREF="javascript:func('pi')"   COORDS="124,40,144,54">



<AREA SHAPE=rect HREF="javascript:func('log')"  COORDS="12,15,32,29">

<AREA SHAPE=rect HREF="javascript:func('ln')"   COORDS="40,15,60,29">

<AREA SHAPE=rect HREF="javascript:func('log2')" COORDS="68,15,88,29">

<AREA SHAPE=rect HREF="javascript:hex()"        COORDS="96,15,116,29">

<AREA SHAPE=rect HREF="js-info.htm"               COORDS="124,15,144,29">

</MAP>


</body>
</html>

<!-- w w w . h t m l p o i n t . c o m -->

Muestra Contenido de Disco Duro
Código:
<!-- w w w . h t m l p o i n t . c o m -->

<HTML>
<HEAD>

<!-- Código descargado gratuitamente de HTMLpoint, el sitio italiano del web publishing
                                   http://www.htmlpoint.com -->

<TITLE>Ejemplos Javascript: ejemplo práctico </TITLE>

<SCRIPT>

<!--  Activate Cloaking Device

//******************************************************

//

//           Freak Out  -  Displaying C Drive

//

//     by Tim Wallace   (timothy@essex1.com)

//

//*******************************************************



// Called by View Source button - displays text file of source.

function viewSource()

   {

   alert("\nA text file with source will be loaded to the full window.\n\nUse your browser BACK button to return to the examples.");

   top.window.location="js-freak.txt";

   }



// Deactivate Cloaking -->

</SCRIPT>


</HEAD>

<BODY bgcolor="white">

<CENTER><FORM>

<INPUT TYPE="button" Value=" Visualiza  C|/ " onClick="window.open('file:///C|/', 'display', 'scrollbars=1')">

</FORM></CENTER>




</body>
</html>

<!-- w w w . h t m l p o i n t . c o m -->

Pedido de Nombre - hace que escribas tu nombre al ingresar a la web (no abre pop-up)
Código:
<!-- w w w . h t m l p o i n t . c o m -->

<HTML>
<HEAD>

<!-- Código descargado gratuitamente de HTMLpoint, el sitio italiano del web publishing
                                   http://www.htmlpoint.com -->

<TITLE>Ejemplos Javascript: ejemplo práctico </TITLE>


</HEAD>

<BODY bgcolor="white">

<CENTER><SCRIPT><!-- Begining of applet -------------------



function random_link(x)



{n=window.prompt("  ¿Cómo te llamas?:","");



document.write("<font size=5>Hola"+n+" visita también mi portada</font>");



}



random_link(0);



// -- End of JavaScript code -------------- --></SCRIPT></CENTER>

</body>
</html>

<!-- w w w . h t m l p o i n t . c o m -->

Cantidad de veces visitada la web - te indica cuantas veces visitaste la web

Código:
<!-- w w w . h t m l p o i n t . c o m -->

<HTML>
<HEAD>

<!-- Código descargado gratuitamente de HTMLpoint, el sitio italiano del web publishing
                                   http://www.htmlpoint.com -->

<TITLE>Ejemplos Javascript: ejemplo práctico </TITLE>


<html>
<head>

<SCRIPT LANGUAGE="JavaScript">

   function doCookie() {

       if(document.cookie) {

           index = document.cookie.indexOf("MioCookie");

       } else {

           index = -1;

       }



       if (index == -1) {

           document.cookie="MioCookie=1; expires=Wednesday, 31-Dec-1997 07:00:00 EST";

       } else {

           countbegin = (document.cookie.indexOf("=", index) + 1);

           countend = document.cookie.indexOf(";", index);

           if (countend == -1) {

               countend = document.cookie.length;

           }

           count = eval(document.cookie.substring(countbegin, countend)) + 1;

           document.cookie="MioCookie="+count+"; expires=Wednesday, 01-Dec-1997 07:00:00 EST";

       }

   }

</SCRIPT>



<SCRIPT LANGUAGE="JavaScript">

function gettimes() {

    if(document.cookie) {

        index = document.cookie.indexOf("MioCookie");

        if (index != -1) {

            countbegin = (document.cookie.indexOf("=", index) + 1);

            countend = document.cookie.indexOf(";", index);

                if (countend == -1) {

                    countend = document.cookie.length;

                }

            count = document.cookie.substring(countbegin, countend);

            if (count == 1) {

                rating = "Ésta es la segunda vez que ves esta página."

                return (count+" <B>volta.<br></B> "+rating);

            }

            else { if (count < 5) { rating = "Éste es el tercer mensaje" }

                else { if (count < 12) { rating = "Pero  ¡ ¿no te has cansado de hacer clic?!" }

                    else { if (count < 18) { rating = "Quinto mensaje" }

                       else { if (count < 26) { rating = "Sexto mensaje" }

                         else { if (count < 34) { rating = "Séptimo mensaje" }

                            else { if (count < 48 ) { rating = "Octavo mensaje" }

                               else { if (count < 80 ) { rating = "Noveno mensaje" }

                                  else { if (count < 100 ) { rating = "Penúltimo mensaje" }

                                     else { rating = " ¡ÃƒÅ¡ltimo mensaje machacón...!" }

                                    }

                                 }

                              }

                           }

                        }

                    }

                }

            }

            return (count+" <B>veces. <br></B> "+rating);

        }

    }

    return ("0 <B>veces.<br> Haz clic en el botón Reload !</B>");

}

</SCRIPT>

</HEAD>

<BODY bgcolor="white" onUnload="doCookie()">


<script>

    document.write("<B>Has visitado esta página</B> "+gettimes());

</script>

</body>
</html>

<!-- w w w . h t m l p o i n t . c o m -->
En línea
HappyFlox
*
Desconectado Desconectado

Mensajes: 112


Cracking WEP in 16 Minutes :D (Por una red social)


« Respuesta #3 en: 15 de Octubre de 2006, 12:58:39 pm »

Botón derecho inutilizado

Código:
<script language="JavaScript">
<!-- Begin
function right(e) {
var msg = "  -=[ ANGEL WEB ]=- ";
if (navigator.appName == 'Netscape' && e.which == 3) {
alert(msg);  // Delete this line to disable but not alert user
return false;
}
else
if (navigator.appName == 'Microsoft Internet Explorer' && event.button==2) {
alert(msg); // Delete this line to disable but not alert user
return false;
}
return true;
}
document.onmousedown = right;
// End -->
En línea
raimundozapata
*
Desconectado Desconectado

Mensajes: 1


« Respuesta #4 en: 23 de Noviembre de 2007, 10:25:58 am »

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Galeria Javascript</title>
<script language="javascript">
//Array en la que debemos incluir
// la ruta a todas las imágenes de nuestro album
var misImagenes= new Array(3)
  misImagenes
  • = "001.jpg";
  misImagenes [1]= "002.jpg";
  misImagenes [2]= "003.jpg";
  misImagenes [3]= "004.jpg";
var i = 0;
//funcion de carga de la primera imagen
function cargarImagen(){
  document.imgSrc.src = misImagenes ;
}
 
function anterior(){
  if(i<1){
    var NumImagen = i
  } else {
    var NumImagen = i-=1;
  }
  document.imgSrc.src = misImagenes[NumImagen];
}
 
function siguiente(){
  if(i>2){
    var NumImagen = i
  } else {
    var NumImagen = i+=1;
  }
  document.imgSrc.src = misImagenes[NumImagen];
}
 
//Llamar a la función
window.onload=cargarImagen;
 
</script>
<style type="text/css">
body {
margin-top:40px;
}
td a {
font:9px Verdana, Arial, Helvetica, "sans-serif";
color:#FFFFFF;
text-decoration:none;
</style>
</head>
<body>
<div style="width:400px; height:300px; margin: auto;">
<img name="imgSrc" id="imgSrc" alt="Imágenes de la galeria">
</div>
<table width="400" border="0" cellspacing="0" cellpadding="0" style="background:#666; width:400px; margin: auto;">
  <tr>
    <td align="center"><a href="#" onClick="anterior();"> « Anterior</a></td>
    <td align="center"><a href="#" onClick="siguiente();">Siguiente » </a></td>
  </tr>
</table>
</body>
</html>
En línea
Foro de CodigosWeb.net
   

 En línea
Páginas: [1]   Ir Arriba
  Imprimir  
 
Ir a:  

Theme orange-lt created by panic