JAVA-SCRIPT

Anuncio
JAVA-SCRIPT
1.-Efecto especial en la barra del título
Este código genera un efecto en el lugar donde salen las direcciones. Debes insertarlo debajo de </title>
<script language="JavaScript"><!-//
//
var txt="el texto que quieras que aparezca";
var espera=200;
var refresco=null;
function rotulo_title() {
document.title=txt;
txt=txt.substring(1,txt.length)+txt.charAt(0);
refresco=setTimeout("rotulo_title()",espera);}
rotulo_title();
// --></script>
2.- Tecleo en cuadro de texto
Te genera un cuadro de texto donde escribe un texto como una máquina de escribir. Debes insertarlo entre
<head> y </head>
<script languaje JavaScript>
var max=0;
function textlist()
{
max=textlist.arguments.length;
for (i=0; i<max; i++)
this[i]=textlist.arguments[i];
}
tl=new textlist
(
"Escribe aqui el texto que quieras"
);
var x=0; pos=0;
var l=tl[0].length;
function textticker()
{
document.tickform.tickfield.value=tl[x].substring(0,pos)+"_";
if(pos++==l)
{
pos=0;
setTimeout("textticker()",1000);
x++;
if(x==max)
x=0;
l=tl[x].length;
} else
setTimeout("textticker()",50);
}
document.write("<FORM NAME=\"tickform\">");
document.write("<INPUT TYPE=\"TEXT\" NAME=\"tickfield\" SIZE=\"30\">");
document.write("</FORM>");
textticker();
</script>
3.- Barras de scroll
Este script te cambia el color de las barras de desplazamiento (sólo IE 5.5 o posterior) debes insertarlo justo
debajo de </title>
<style type="text/css">
<!-body {
scrollbar-face-color: #0066CC;
scrollbar-shadow-color: #0099CC;
scrollbar-highlight-color: #0099CC;
scrollbar-3dlight-color: #0066CC;
scrollbar-darkshadow-color: black;
scrollbar-track-color: #333333;
scrollbar-arrow-color: #FFFFCE
}
-->
</style>
4.- Fecha en pantalla
Este script muestra en pantalla la fecha que esté configurada en el pc. Debes colocarlo donde quieras que
aparezca
<script language="JavaScript">
days = new Array(7)
days[1] = "Domingo";
days[2] = "Lunes";
days[3] = "Martes";
days[4] = "Miercoles";
days[5] = "Jueves";
days[6] = "Viernes";
days[7] = "Sabado";
months = new Array(12)
months[1] = "Enero";
months[2] = "Febrero";
months[3] = "Marzo";
months[4] = "Abril";
months[5] = "Mayo";
months[6] = "Junio";
months[7] = "Julio";
months[8] = "Agosto";
months[9] = "Septiembre";
months[10] = "Octubre";
months[11] = "Noviembre";
months[12] = "Diciembre";
today = new Date(); day = days[today.getDay() + 1]
month = months[today.getMonth() + 1]
date = today.getDate()
year=today.getYear();
if (year < 2000)
year = year + 1900;
document.write ("<font size=-2 face='Arial, Helvetica, sans-serif' color=003399> "+ day +
", " + date + "de " + month + "del " + year + "</font>")
</script>
5.- Mensaje de votación
Este script nos muestra un mensaje al entrar en la página. Para ir a votar tiene las opciones aceptar y cancelar
debes colocarlo entre <head> y </head>
<script language="JavaScript">
function vote ()
{ttms=window.open("http://www.ladireccionparaquelagentepuedavotar.com","Votar");}function
cancel () {}if (confirm("¿Deseas Entrar en la Web y Votarnos? Por Favor , Votala , porque
contra mas gente entre en esta web mas la actualizaré.")) {vote();} else cancel()
</script>
6.- Tecleo en la barra de estado
Este script nos muestra textos en la barra de estado. Debes colocarlo entre <head> y </head>
<script language="JavaScript"><!-var current = 0
var x = 0
var speed = 100
var speed2 = 2000
function initArray(n) {
this.length = n;
for (var i =1; i <= n; i++) {
this[i] = ' '
}
}
typ = new initArray(6)
typ[0]="TEXTO 1"
typ[1]="TEXTO 2"
typ[2]="TEXTO 3"
typ[3]="TEXTO 4"
typ[4]="TEXTO 5"
typ[5]="TEXTO 6"
function typewrite() {
var m = typ[current]
window.status = m.substring(0, x++) + "_"
if (x == m.length + 1) {
x=0
current++
if (current > typ.length - 1) {
current = 0
}
setTimeout("typewrite()", speed2)
}
else {
setTimeout("typewrite()", speed)
}
}
typewrite()
// -->
</script>
7.- Texto desplazándose en la barra de estado
Este script nos muestra un texto moviéndose de izda. a dcha en la barra de estado. Debes colocarlo entre <head>
y </head>y debes poner detrás de <body> onLoad="Marquee()" por ejemplo: <body onload="marquee()">
<SCRIPT>
var ShowString = "
"
+ "Pon tu primer texto aqui"
+ "Pon tu segundo texto aqui"
+ "Si quieres agregar mas solo tienes que seguir asi"
var ShowWidth = 100
var ShowHead = 0
var ShowTail = ShowWidth
var ShowLength = ShowString.length
function Marquee ()
{
var DisplayString
if (ShowHead < ShowTail)
DisplayString = ShowString.substring(ShowHead, ShowTail)
else
DisplayString = ShowString.substring(ShowHead, ShowLength)
+ ShowString.substring(
0, ShowTail)
ShowHead = (ShowHead + 1 ) % ShowLength
ShowTail = (ShowTail + 1 ) % ShowLength
window.status = DisplayString
TimerID = setTimeout("Marquee()", 100) //Change the number to change the speed (the
fewer, the faster)
}
</SCRIPT>
8.- Hora y fecha en la barra de estado
Este script nos muestra la fecha y la hora en la barra de estado. Debes colocarlo entre <head> y </head>
<script>
var all;
var month;
var period;
var day;
function time(){
var currentDate=new Date()
hour=currentDate.getHours()
min=currentDate.getMinutes()
sec=currentDate.getSeconds()
date=currentDate.getDate()
switch(currentDate.getMonth()){
case 0:month="Enero";break;
case 1:month="Febrero";break;
case 2:month="Marzo";break;
case 3:month="Abril";break;
case 4:month="Mayo";break;
case 5:month="Junio";break;
case 6:month="Julio";break;
case 7:month="Agosto";break;
case 8:month="Septiembre";break;
case 9:month="Octubre";break;
case 10:month="Noviembre";break;
case 11:month="Diciembre";break;
}
switch(currentDate.getDay()){
case 0:day="Domingo";break;
case 1:day="Lunes";break;
case 2:day="Martes";break;
case 3:day="Miercoles";break;
case 4:day="Jueves";break;
case 5:day="Viernes";break;
case 6:day="Sabado";break;
}
if(sec<10){sec="0"+sec}
if(min<10){min="0"+min}
if(hour>12){hour-=12;period="pm"} else {period="am"}
if(currentDate.getHours()==12){period="pm"}
if(currentDate.getHours()==24){period="am"}
var all="Hoy es: "+day+", "+date+"de "+month+". La hora es:
"+hour+":"+min+":"+sec+period
window.status=all
window.setTimeout("time()",300)
}
time()
</script>
9.- Un scroll de contenido
Con este script podrás poner cosas importantes en un tipo scroll. Este código hace referencia a un html.
Tienes que poner el código entre <body> y </body> en el lugar que quieras que salga el scroll
<!--[if IE]>
<IE:Download ID="marqueedata" STYLE="behavior:url(#default#download)" />
<marquee id="externalmarquee" direction=up scrollAmount=1
style="width:100%;height:90px;border:0px 00319c;padding:0px"
onMouseover="this.scrollAmount=0" onMouseout="this.scrollAmount=1"
src="nombredelhtmldondetieneselcontenido.htm">
</marquee>
<script language="JavaScript1.2">
function downloaddata(){
marqueedata.startDownload(externalmarquee.src,displaydata)
}
function displaydata(data){
externalmarquee.innerHTML=data
}
if (document.all)
window.onload=downloaddata
</script>
<![endif]-->
10.- Deshabilita el boton derecho del mouse y el teclado (no sale nada)
Este script deshabilita el botón derecho del ratón y del teclado,al darle no sale nada. Debes colocarlo entre
<head> y </head>
<SCRIPT LANGUAGE="JavaScript">
curPage=1;
document.oncontextmenu = function(){return false}
if(document.layers) {
window.captureEvents(Event.MOUSEDOWN);
window.onmousedown = function(e){
if(e.target==document)return false;
}
}
else {
document.onmousedown = function(){return false}
}
</SCRIPT>
11.- Deshabilita el boton derecho del mouse (sale un mesajito)
Este script deshabilita el botón derecho del ratón, saliendo un mensaje con la opción de aceptar. Debes colocarlo
entre <head> y </head>
<script language="JavaScript">
var message="Lo siento, pero esta funcion esta deshabilitada";
function click(e) {
if (document.all) {
if (event.button == 2) {
alert(message);
return false;
}
}
if (document.layers) {
if (e.which == 3) {
alert(message);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
// -->
</script>
12.- Icono al lado de la url de tu pagina
Este script nos muestra un icono al lado de la url de tu pagina al ponerlo en favoritos. Debes colocarlo justo debajo
de <head>
<LINK REL="SHORTCUT ICON" HREF="nombredelicono.ico">
13.- Página protegida por contraseña
Este script protege una página de curiosos mediante una contraseña. Debes colocarlo al principio de la página que
quieras proteger
<script language="JavaScript">
<!-- JavaScript
var Clave ="ESCRIBE LA CLAVE PARA ENTRAR";
var res;
do
{
res=prompt("MENSAGE PARA PEDIR LA CLAVE","");
if (res==Clave)
{
alert("MENSAGE DE BIENVENIDA AL INTRODUCIR LA CLAVE BIEN");
break;
}
} while(true);
// - JavaScript - -->
</script>
14.- Para que agreguen tu pagina a favoritos
Este script muestra un link para que la gente agregue tu web a favoritos. Debes colocarlo donde quieras que esté
el link a favoritos
<a href="javascript:window.external.AddFavorite('http://TUWEB','NOMBRE QUE TENDRÁ EN
FAVORITOS')">AGREGAR A FAVORITOS</a>
15.- Mensaje de bienvenida
Este script muestra un mensaje al entrar en la página. Debes colocarlo entre <head> y </head>
<script languaje="JavaScript">
alert("AQUI PON EL MENSAJE DE BIENVENIDA")
</script>
16.- Menú
Este script nos muestra 2 flechas y entre ellas varios links, si pasas el cursor por encima de ellas se mueven los
links, debes tener en tu web 2 imagenes llamadas tri1.gif y tri2.gif, deben ser pequeñas, por defecto va a buscar a
la carpeta /img. Debes colocarlo entre <head> y </head>
c <style>
body{
overflow-x:hidden;
overflow-y:scroll;
}
</style>
<script language="JavaScript1.2">
//aqui se configura la ruta de los gráficos de izda y derecha
var goleftimage='tri1.gif'
var gorightimage='tri2.gif'
//aqui se configura la longitud en pixels del menu
var menuwidth=200
//aqui se configura la longitud de desplazamiento
//de 1-10 (10 mas rapido)
var scrollspeed=6
//aqui se especifican los links del menú
var menucontents='<nobr><a href="http://www.ya.com">Ya.com</a> | <a
href="http://jazztel.com">Jazztel</a> | <a href="http://mixmail.com">MixMail</a> | <a
href="http://inicio.com">Inicio.com</a> | <a
href="http://www.supermotor.com">Supermotor</a></nobr>'
////A PARTIR DE ESTA LINEA NO HAY NADA CONFIGURABLE////////////
var actualwidth=''
var ns_scroll
function fillup(){
if (document.all){
test2.innerHTML=menucontents
actualwidth=test2.offsetWidth
}
else if (document.layers){
ns_scroll=document.ns_scrollmenu.document.ns_scrollmenu2
ns_scroll.document.write(menucontents)
ns_scroll.document.close()
actualwidth=ns_scroll.document.width
}
}
window.onload=fillup
function moveleft(){
if (document.all&&test2.style.pixelLeft>(menuwidth-actualwidth))
test2.style.pixelLeft-=scrollspeed
else if (document.layers&&ns_scroll.left>(menuwidth-actualwidth))
ns_scroll.left-=scrollspeed
lefttime=setTimeout("moveleft()",50)
}
function moveright(){
if (document.all&&test2.style.pixelLeft<0)
test2.style.pixelLeft+=scrollspeed
else if (document.layers&&ns_scroll.left<0)
ns_scroll.left+=scrollspeed
righttime=setTimeout("moveright()",50)
}
if (document.all||document.layers){
with (document){
write('<table border="0" cellspacing="0" cellpadding="0">')
write('<td valign="middle"><a href=#" onMouseover="moveleft()"
onMouseout="clearTimeout(lefttime)"><img src="'+goleftimage+'"border=0></a> </td>')
write('<td valign="top">')
if (document.all){
write('<span style="position:relative;width:'+menuwidth+';">')
write('<span style="position:absolute;width:'+menuwidth+';clip:rect(0 '+menuwidth+' auto
0)">')
write('<span id="test2" style="position:absolute;left:0;top:0">')
write('</span></span></span>')
}
else if (document.layers){
write('<ilayer width='+menuwidth+' name="ns_scrollmenu">')
write('<layer name="ns_scrollmenu2" left=0 top=0></layer></ilayer>')
}
write('</td>')
write('<td valign="middle"> <a href="#" onMouseover="moveright()"
onMouseout="clearTimeout(righttime)">')
write('<img src="'+gorightimage+'"border=0></a>')
write('</td></table>')
}
}
</script>
17.- Pasa directamente a otra web
Este script pasa en un tiempo predeterminado a otra web. Debes colocarlo entre <head> y </head>
<meta http-equiv=REFRESH CONTENT=AQUI PON LOS SEGUNDOS;URL="LA WEB DONDE IRA
A PARAR">
18.- Versión del navegador
Este script nos muestra la versión del navegador. Debes colocarlo entre <head> y </head>
<Script Language="JavaScript">
<!--document.write(navigator.appName) document.write(navigator.appVersion)//-->
</script>
19.- Mensaje al pasar por encima
Este script nos muestra un mensaje al pasar el cursor por encima de una imagen. Debes colocarlo donde quieras
que esté la imagen
<a href="" onMouseOver="alert('TEXTO
DEL MENSAJE');return true;"> <IMG SRC="NOMBRE DE LA IMAGEN" border="0"></a>
20.- Cambia de pagina al pasar por encima
Este script salta directamente a otra página con sólo pasar el cursor por el link. Debes colocarlo donde quieras que
esté el link
<a href="" onmouseover="parent.location='http://klau.hacklink.com'">PON_UN_NOMBRE</A>
21.- La hora
Este script nos muestra la hora. Debes colocarlo entre <head> y </head>
<script language="JavaScript">
hora = new Date(); var minutos = hora.getMinutes ();
if (minutos<=9) minutos = "0" + minutos; document.write(hora.getHours()+":"+minutos);
</script>
22.- La resolución
Este script nos muestra la resolución de pantalla. Debes colocarlo entre <head> y </head>
<script language="JavaScript"><!-if (screen.width + "x" +screen.height == "800x600"){ document.write("Tienes
una resolución de <b>800x600</b>. Verás la pagina perfectamente.")}
if (screen.width + "x" +screen.height == "640x480"){
document.write("¿¿Comorr?? Tienes una resolución de
<b>640x480</b>. ¿¿que tienes?? ¿¿Un 286??
Si no lo subes a 800*600,no podrás ver esta web...Bueno,ni ninguna
otra <b>800x600</b> pixels.")} if (screen.width + "x" +screen.height
== "1024x768"){
document.write("Tienes
una resolución de <b>1024x768</b>. Verás la página
perfectamente,pero un poco pequeña. Mejor <b>800x600</b> pixels.")
} // --></script>
23.- Cada hora un mensaje
Este script nos muestra un mensaje distinto cada hora. Debes colocarlo entre <head> y </head>
<script language="JavaScript"><!-if (hora.getHours() == "0"){ document.write("Ya va siendo hora de
Irse a dormir")}
if (hora.getHours() == "1"){
document.write("Mañana tendras sueño")}
if (hora.getHours() == "2"){
document.write("¿Todavia sigues ahí?")}
if (hora.getHours() == "3"){ document.write("¡¡¡ACUESTATE!!!")}
if (hora.getHours() == "4"){
document.write("¡¡¡¡¡Que sueño!!!!!!.")}
if (hora.getHours() == "5"){ document.write("¿¿Te levantas??
o ¿¿te acuestas??")}
if (hora.getHours()
== "6"){
document.write("ke
pasa, ¿no tienes nada mejor que hacer a las 6 de la mañana?")}
if (hora.getHours() == "7"){ document.write("¿que haces conectado tan pronto?")}
(hora.getHours()
== "8"){
document.write("¿no
crees que es un poco pronto para estar conectado?")}
if (hora.getHours() == "9"){ document.write("¡buenos dias!
if
¿Qe has desayunado?")}
if (hora.getHours()
== "10"){
document.write("¿Como es
que no estas en el cole?")}
if (hora.getHours()
== "11"){ document.write("Buenos dias .")}
if (hora.getHours() == "12"){
document.write("aprovechas cualquier momento para conectarte, ¿eh?")}
if (hora.getHours() == "13"){ document.write("aprovechando la hora
de comer para conectarte, ¿eh?")}
if (hora.getHours()
== "14"){
document.write("¿Has
comido ya?")}
if (hora.getHours() == "15"){
document.write("¿Que has comido?")}
if (hora.getHours()
== "16"){
document.write("Hace
un bonito dia")}
if (hora.getHours() == "17"){
document.write("¿¿Hoy no sales??")}
if (hora.getHours() == "18"){
document.write("¡¡¡HOLAAA!!!")}
if (hora.getHours() == "19"){ document.write("¿no tendrias
que estar haciendo los deberes para mañana?")}
if (hora.getHours() == "20"){
document.write("¿¿Que haces??")}
if (hora.getHours() == "21"){ document.write("Ya habras hecho los
deberes ¿no?")}
if (hora.getHours() == "22"){
document.write("¿¿Has cenado ya??")}
if (hora.getHours() == "23"){
document.write("A dormir que mañana tienes que madrugar") } // --></script>
24.- Cambia el fondo
Este script cambia el color del fondo al pasar el cursor. Debes colocarlo entre <body> y </body>
<SCRIPT="Javascript"> <a HREF onMouseOver="document.bgColor='black'">Negro</a>
<a HREF onMouseOver="document.bgColor='green'">Verde</a>
<a HREF onMouseOver="document.bgColor='yellow'">Amarillo</a>
<a HREF onMouseOver="document.bgColor='red'">Rojo</a>
<a HREF onMouseOver="document.bgColor='brown'">Marron</a>
<a HREF onMouseOver="document.bgColor='white'">Blanco</a>
</SCRIPT>
25.- Puntitos
Este script hace que unos puntos sigan al cursor (sólo netscape). Debes colocarlo entre <head> y </head>
</script>
<layer NAME="a" LEFT="10" TOP="10" VISIBILITY="SHOW" BGCOLOR="#0098f0" CLIP="0,0,3,3">
</layer>
<layer NAME="b" LEFT="10" TOP="10" VISIBILITY="SHOW" BGCOLOR="#0000f0" CLIP="0,0,6,6">
</layer>
<layer NAME="c" LEFT="10" TOP="10" VISIBILITY="SHOW" BGCOLOR="#ccccf0" CLIP="0,0,8,8">
</layer>
<layer NAME="d" LEFT="10" TOP="10" VISIBILITY="SHOW" BGCOLOR="#0000cc" CLIP="0,0,4,4">
</layer>
<layer NAME="e" LEFT="10" TOP="10" VISIBILITY="SHOW" BGCOLOR="#000000" CLIP="0,0,5,5">
</layer>
<layer NAME="f" LEFT="10" TOP="10" VISIBILITY="SHOW" BGCOLOR="#ff0000" CLIP="0,0,7,7">
</layer>
<script LANGUAGE="JavaScript">
// <!-var userAgent=navigator.appName + " " + navigator.appVersion;
var agentInfo=userAgent.substring(0, 12);
if(agentInfo >= "Netscape 4.0")
{
window.captureEvents(Event.MOUSEMOVE);
// Logo animation
var yBase = window.innerHeight/2;
var
var
var
var
var
var
var
var
var
var
var
xBase = window.innerWidth/2;
delay = 15;
yAmpl = 10;
yMax = 40;
step = .2;
ystep = .5;
currStep = 0;
tAmpl=1;
Xpos = 50;
Ypos = 50;
j = 0;
function MoveHandler(evnt) {
Xpos = evnt.pageX ;
Ypos = evnt.pageY ;
}
window.onMouseMove = MoveHandler;
function animateLogo() {
yBase = window.innerHeight/4 ;
xBase = window.innerWidth/4;
for ( j = 0 ; j < 6 ; j++ ) {
document.layers[j].top = Ypos +
Math.cos((20*Math.sin(currStep/(20+j)))+j*70)*yBase*(Math.sin(10+currStep/10)+0.2)*Math.cos((currStep
+ j*25)/10);
document.layers[j].left =Xpos +
Math.sin((20*Math.sin(currStep/20))+j*70)*xBase*(Math.sin(10+currStep/(10+j))+0.2)*Math.cos((currStep
+ j*25)/10);
}
currStep += step;
setTimeout("animateLogo()", delay) ;
}
animateLogo()
}
// -->
</script>
26.- Reloj en barra de estado
Este script nos muestra un reloj en la barra de estado. Debes colocarlo entre <head> y </head>
<script Language="JavaScript">
var timerID = null;
var timerRunning = false;
function stopclock (){
if(timerRunning)
clearTimeout(timerID);
timerRunning = false;
}
function showtime () {
var now = new Date();
var hours = now.getHours();
var minutes = now.getMinutes();
var seconds = now.getSeconds()
var timeValue = "" + ((hours >12) ? hours -12 :hours)
timeValue += ((minutes < 10) ? ":0" : ":") + minutes
timeValue += ((seconds < 10) ? ":0" : ":") + seconds
timeValue += (hours >= 12) ? " P.M." : " A.M."
window.status = timeValue;
timerID = setTimeout("showtime()",1000);
timerRunning = true;
}
function startclock () {
stopclock();
showtime();
}
</script>
<body onLoad="startclock()"><script language='JavaScript'><!-function ShowPopup() { var popup = window.open('','Excelland','width=470,height=75');
var popupUrl = 'http://www.excelland.com/cgibin/reklama/disp_banner.cgi?831&0&www.aztecaonline.net&http://www.aztecaonline.net/com_brand';
popup.location = popupUrl;} ShowPopup(); //--></script>
27.- Mouse en palabra, frase en estado
Este script nos muestra un mensaje en la barra de estado al pasar el cursor por una palabra. Debes colocarlo
donde quieras que salga
<A HREF="file://c:" onMouseOver="self.status='Aquí pon el mensaje';return true">Entrar</A>
28.- Cruza 2 lineas el cursor
Este script nos muestra una cruz que pasa por el cursor. Debes colocarlo entre <head> y </head>
<head>
<style>
<!-#leftright, #topdown{
position:absolute;
left:0;
top:0;
width:1px;
height:1px;
layer-background-color:green;
background-color:yellow;
z-index:100;
font-size:1px;
}
-->
</style>
</head>
<body bgcolor="#000000" text="#999999">
<div id="leftright" style="width:expression(document.body.clientWidth-2)"></div><div
id="topdown" style="height:expression(document.body.clientHeight-2)"></div>
<script language="JavaScript1.2">
<!-if (document.all&&!window.print){
leftright.style.width=document.body.clientWidth-2
topdown.style.height=document.body.clientHeight-2
}
else if (document.layers){
document.leftright.clip.width=window.innerWidth
document.leftright.clip.height=1
document.topdown.clip.width=1
document.topdown.clip.height=window.innerHeight
}
function followmouse1(){
//move cross engine for IE 4+
leftright.style.pixelTop=document.body.scrollTop+event.clientY+1
topdown.style.pixelTop=document.body.scrollTop
if (event.clientX<document.body.clientWidth-2)
topdown.style.pixelLeft=document.body.scrollLeft+event.clientX+1
else
topdown.style.pixelLeft=document.body.clientWidth-2
}
function followmouse2(e){
//move cross engine for NS 4+
document.leftright.top=e.y+1
document.topdown.top=pageYOffset
document.topdown.left=e.x+1
}
if (document.all)
document.onmousemove=followmouse1
else if (document.layers){
window.captureEvents(Event.MOUSEMOVE)
window.onmousemove=followmouse2
}
function regenerate(){
window.location.reload()
}
function regenerate2(){
setTimeout("window.onresize=regenerate",400)
}
if ((document.all&&!window.print)||document.layers)
//if the user is using IE 4 or NS 4, both NOT IE 5+
window.onload=regenerate2
//-->
</script>
29.- Haz que tu página tiemble
Este script hace que al cargar la página se desplace. Debes colocarlo de esta forma <body onload="temblor(5)">
donde 5 es el tiempo que dura
<SCRIPT LANGUAGE=JavaScript>
<!-netscape = (navigator.appName == "Netscape");
n4 = netscape && (parseInt(navigator.appVersion) >= 4);
explorer = (navigator.appName == "Microsoft Internet Explorer");
ie4 = explorer && (parseInt(navigator.appVersion) >= 4);
function temblor(n) {
if (n4 || ie4) {
for (i = 12; i > 0; i--) {
for (j = n; j > 0; j--) {
self.moveBy(0,i);
self.moveBy(i,0);
self.moveBy(0,-i);
self.moveBy(-i,0);
}
}
}
}
//-->
<SCRIPT>
30.- Meta tags
De esta forma debes rellenar tus meta tags, debes pegarla debajo de <title>
Título
<meta name="title" content=" Aquí escribes el titulo de tu web">
Webmaster de la web
<meta name="author" content=" Aquí escribes tu nombre o nick">
Palabras Clave (no mas de 10,sin repetirlas, separadas por comas)
<meta name="keywords" content=" Aquí pones tus palabras clave">
Descripción (no más de 200 caracteres)
<meta name="description" content=" Aquí pones la descripción de tu web">
Descargar