Documentos de Académico
Documentos de Profesional
Documentos de Cultura
mp4"width="500" height="500">
<p>
<HTML>
<head></head>
<title</title>
<frameset rows="50,*">
<frameset cols="50,*">
</frameset </frameset>
<body> </body>
</html>
Etiqueta Etiqueta
Des. DTD Descripción
inicial final
Home page
IMG>
Antes de describir en detalle la marca principal de inserción de imágenes en
los hipertextos, es conveniente precisar algunos conceptos de HTML. A Test
diferencia de muchos procesadores de texto (Ms Word, por ejemplo), los
hipertextos no se "funden" con las imágenes que les sirven de
acompañamiento gráfico, sino que se limitan a invocarlas desde un recorrido F.a.q.
específico in situ o en el web. Dicho de otro modo, existe una división muy
clara entre archivo .htm e imágenes (y también sonidos, apliques, etc.). Los
documentos HTML se limitan a prever dentro de ellos un espacio en el que Copyright
se insertan las imágenes solicitadas.
<IMG SRC="immagine.gif">
500 Applet Java
donce SRC corresponde al inglés Search y es el recorrido del que el Dynamic HTML
navegador saca la imagen (en este caso "immagine.gif"). Como hemos 350 Javascript
señalado, esta marca es única en el sentido de que NO lleva como cierre el un JS a la
correspondiente </IMG>. semana
ALT
El uso de texto para comentar las imágenes es una regla fundamental que Macromedia Flash
debemos observar en la creación de sitios web por varias razones: Accessibilidad
Curso Javascript
Tutorial Javascript
algunos navegadores pordrían estar impostados para no invocar las Tutorial DHTML
imágenes; La Guía Smil
La guía a
los navegadores textuales para invidentes no conseguirían interpretar las PHP
imágenes si carecieran de comentario;
es posible evitar pies de imagen incluyendo comentarios dentro de la
imagen misma.
WIDTH y HEIGHT
En los ejemplos vistos hasta ahora, no hemos especificado las medidas de la
imagen que el navegador se ha encargado de buscar automáticamente. Es
posible definir la anchura y la altura de la imagen gracias a los atributos width
y height, respectivamente:
HSPACE y VSPACE
Con estos dos atributos podemos establecer la distancia en píxel de la
imagen a los objetos que se encuentran a los cuatro lados de la misma.
ALIGN
El atributo ALIGN define la posición de la imagen respecto al texto colocado
inmediatamente antes o después de la misma. Existen varias opciones para
el atributo ALIGN:
S i g u i e n t e l e c c i ó n
[ Í n d i c e ]
© 1997-2006 - All rights reserved HTML.it s.r.l. - Design, layout and articles are copyrighted.
Una de las primeras cosas que debemos aprender del HTML es la etiqueta <img> que
funciona para colocar imágenes dentro de una página web.
<img src="imagenHTML.jpg">
<img src="folder/imagenHTML.jpg"
El ancho y alto (width, height) se coloca en pixeles y deben corresponder al tamaño original
de la imagen para que no se distorcione.
Para alinear una imagen horizontalmente podemos hacerlo de la misma forma que
el texto, es decir, utilizando el atributo align dentro de una etiqueta <p> o <div>.
En este caso, lo que incluiremos dentro de esa etiqueta será la imagen en lugar
del texto:
Sin embargo, ya hemos dicho que la etiqueta <img> puede aceptar el atributo
align. En este caso, la utilidad que le damos difiere de la anterior.
Aquí podéis ver el tipo de código a crear para obtener dicho efecto:
<p>
<img src="imagen.gif" align="right">Texto tan extenso como queramos que cubrirá la parte
izquierda de la imagen. Sigo poniendo texto para que se vea el efecto, Bla bla bla bla bla
bla bla...
</p>
Quedaría así:
Texto tan extenso
como queramos
que cubrirá la
parte izquierda de
la imagen. Sigo poniendo texto para
que se vea el efecto, Bla bla bla bla
bla bla bla...
<p>
<img src="imagen.gif" align="left">Texto tan extenso como queramos que cubrirá la parte
derecha de la imagen. Sigo poniendo texto para que se vea el efecto, Bla bla bla bla bla
bla bla...
</p>
Quedaría así:
Texto tan extenso
como queramos
que cubrirá la
parte izquierda de
la imagen. Sigo poniendo texto para
que se vea el efecto, Bla bla bla bla
bla bla bla...
Si en algún momento deseásemos dejar de rellenar ese espacio lateral, podemos
pasar a una zona libre introduciendo un salto de línea <br> dentro del cual
añadiremos un atributo: clear
<br clear="left">
Saltara verticalmente hasta encontrar el lateral izquierdo libre.
<br clear="right">
Saltara verticalmente hasta encontrar el lateral derecho libre.
<br clear="all">
Saltará verticalmente hasta encontrar ambos laterales libres.
Ejemplo de clear:
Texto tan extenso
como queramos
que cubrirá la
parte izquierda.
Esto está debajo de la imagen.
Existen otro tipo de valores que puede adoptar el atributo align dentro de la
etiqueta <img>. Estos son relativos a la alineación vertical de la imagen.
Supongamos que escribimos una línea al lado de nuestra imagen. Esta línea
puede quedar por ejemplo arriba, abajo o al medio de la imagen. Asimismo, puede
que en una misma línea tengamos varias imágenes de alturas diferentes que
pueden ser alineadas de distintas formás.
Estos valores adicionales del atributo align son:
top
Ajusta la imagen a la parte más alta de la línea. Esto quiere decir que, si hay una
imagen más alta, ambas imágenes presentaran el borde superior a la misma
altura.
bottom
Ajusta el bajo de la imagen al texto.
Absbottom
Colocara el borde inferior de la imagen a nivel del elemento más bajo de la línea.
middle
Hace coincidir la base de la línea de texto con el medio vertical de la imagen.
absmiddle
Ajusta la imagen al medio absoluto de la línea.
Estas explicaciones, que pueden resultar un poco complicadas, pueden ser más
fácilmente asimiladas a partir con un poco de practica.
Para poder cambiar la dirección de movimiento tenemos que cambiar la palabra up (arriba)
por right(derecha), left(izquierda) o down(abajo).
Ahora, para cambiar la rapidez con la cual se mueven las imagenes o el texto hay que cambiar el
Número 2 que viene por defecto donde se encuetra scrollamount. Mientras más grande sea la cifra
o el Número más rápido será.
<html>
<body background="fondo.jpg">
<p>Se pueden utilizar archivos en formato jpg, gif o png. No es recomendable usar otro
formato.</p>
</body>
</html>
El gran dominador de la competición masculina ha sido históricamente la Selección de Estados Unidos que, en las
18 ediciones disputadas ha ganado un total de 17 medallas: catorce de oro, una de plata y dos de bronce. La única
edición en la que Estados Unidos no aparece en el podio es en los Juegos Olímpicos de Moscú 1980, ya que no
participó por motivos políticos.
En los Juegos Olímpicos de Barcelona 1992 la competición se abrió por primera vez a la participación de los
jugadores profesionales de la NBA, acudiendo a los juegos uno de los equipos más potentes de la historia de este
deporte, conocido desde entonces con el sobrenombre de Dream Team, en el que se reunieron jugadores tan
extraordinarios como Michael Jordan, Magic Johnson o Larry Bird.
El vigente campeón olímpico es Estados Unidos, que ganó la medalla de oro en los Juegos Olímpicos de Rio de
Janeiro, derrotando en la final a España en la categoría femenina y Serbia en la categoría masculina.
<html> Defines the root of an HTML document
<i> Defines a part of text in an alternate voice or mood
<link> Defines the relationship between a document and an external resource (most used
sheets)
<menuitem Defines a command/menu item that the user can invoke from a popup menu
>
<noscript> Defines an alternate content for users that do not support client-side scripts
<rp> Defines what to show in browsers that do not support ruby annotations
<source> Defines multiple media resources for media elements (<video> and <audio>)
<track> Defines text tracks for media elements (<video> and <audio>)
<u> Defines text that should be stylistically different from normal text
Tag Description
<col> Specifies column properties for each column within a <colgroup> element
accept <input>
accept-charset <form>
action <form>
alt <area>, <img>, <input>
async <script>
autocomplete <form>, <input>
autofocus <button>, <input>, <keygen>, <select>,<textarea>
autoplay <audio>, <video>
challenge <keygen>
charset <meta>, <script>
checked <input>
colspan <td>, <th>
content <meta>
controls <audio>, <video>
coords <area>
data <object>
datetime <del>, <ins>, <time>
default <track>
defer <script>
dirname <input>, <textarea>
download <a>, <area>
enctype <form>
for <label>, <output>
formaction <button>, <input>
headers <td>, <th>
height <canvas>, <embed>, <iframe>, <img>,<input>, <object>, <video>
high <meter>
href <a>, <area>, <base>, <link>
hreflang <a>, <area>, <link>
http-equiv <meta>
id Global Attributes
ismap <img>
keytype <keygen>
kind <track>
label <track>
list <input>
loop <audio>, <video>
low <meter>
manifest <html>
max <input>, <meter>, <progress>
maxlength <input>, <textarea>
media <a>, <area>, <link>, <source>, <style>
method <form>
min <input>, <meter>
multiple <input>, <select>
muted <video>
name <button>, <fieldset>, <form>, <iframe>,<input>, <keygen>, <map>, <meta>,<object>, <output>, <param>, <se
novalidate <form>
onabort <audio>, <embed>, <img>, <object>,<video>
onafterprint <body>
onbeforeprint <body>
onbeforeunload <body>
oncanplay <audio>, <embed>, <object>, <video>
oncanplaythrough <audio>, <video>
oncuechange <track>
ondurationchange <audio>, <video>
onemptied <audio>, <video>
onended <audio>, <video>
onerror <audio>, <body>, <embed>, <img>,<object>, <script>, <style>, <video>
onhashchange <body>
onload <body>, <iframe>, <img>, <input>,<link>, <script>, <style>
onloadeddata <audio>, <video>
onloadedmetadata <audio>, <video>
onloadstart <audio>, <video>
onoffline <body>
ononline <body>
onpagehide <body>
onpageshow <body>
onpause <audio>, <video>
onplay <audio>, <video>
onplaying <audio>, <video>
onpopstate <body>
onprogress <audio>, <video>
onratechange <audio>, <video>
onreset <form>
onresize <body>
onsearch <input>
onseeked <audio>, <video>
onseeking <audio>, <video>
onshow <menu>
onstalled <audio>, <video>
onstorage <body>
onsubmit <form>
onsuspend <audio>, <video>
ontimeupdate <audio>, <video>
ontoggle <details>
onunload <body>
onvolumechange <audio>, <video>
onwaiting <audio>, <video>
onwheel All visible elements.
open <details>
optimum <meter>
pattern <input>
placeholder <input>, <textarea>
poster <video>
preload <audio>, <video>
readonly <input>, <textarea>
rel <a>, <area>, <link>
required <input>, <select>, <textarea>
reversed <ol>
rows <textarea>
rowspan <td>, <th>
sandbox <iframe>
scope <th>
scoped <style>
selected <option>
shape <area>
size <input>, <select>
sizes <link>
span <col>, <colgroup>
src <audio>, <embed>, <iframe>, <img>,<input>, <script>, <source>, <track>,<video>
srcdoc <iframe>
srclang <track>
start <ol>
step <input>
target <a>, <area>, <base>, <form>
type <button>, <embed>, <input>, <link>,<menu>, <object>, <script>, <source>,<style>
usemap <img>, <object>
value <button>, <input>, <li>, <option>,<progress>, <param>
width <canvas>, <embed>, <iframe>, <img>,<input>, <object>, <video>
wrap <textarea>
AntiqueWhite #FAEBD7 S
Aqua #00FFFF S
Aquamarine #7FFFD4 S
Azure #F0FFFF S
Beige #F5F5DC S
Bisque #FFE4C4 S
Black #000000 S
BlanchedAlmond #FFEBCD S
Blue #0000FF S
BlueViolet #8A2BE2 S
Brown #A52A2A S
BurlyWood #DEB887 S
CadetBlue #5F9EA0 S
Chartreuse #7FFF00 S
Chocolate #D2691E S
Coral #FF7F50 S
CornflowerBlue #6495ED S
Cornsilk #FFF8DC S
Crimson #DC143C S
Cyan #00FFFF S
DarkBlue #00008B S
DarkCyan #008B8B S
DarkGoldenRod #B8860B S
DarkGray #A9A9A9 S
DarkGrey #A9A9A9 S
DarkGreen #006400 S
DarkKhaki #BDB76B S
DarkMagenta #8B008B S
DarkOliveGreen #556B2F S
DarkOrange #FF8C00 S
DarkOrchid #9932CC S
DarkRed #8B0000 S
DarkSalmon #E9967A S
DarkSeaGreen #8FBC8F S
DarkSlateBlue #483D8B S
DarkSlateGray #2F4F4F S
DarkSlateGrey #2F4F4F S
DarkTurquoise #00CED1 S
DarkViolet #9400D3 S
DeepPink #FF1493 S
DeepSkyBlue #00BFFF S
DimGray #696969 S
DimGrey #696969 S
DodgerBlue #1E90FF S
FireBrick #B22222 S
FloralWhite #FFFAF0 S
ForestGreen #228B22 S
Fuchsia #FF00FF S
Gainsboro #DCDCDC S
GhostWhite #F8F8FF S
Gold #FFD700 S
GoldenRod #DAA520 S
Gray #808080 S
Grey #808080 S
Green #008000 S
GreenYellow #ADFF2F S
HoneyDew #F0FFF0 S
HotPink #FF69B4 S
IndianRed #CD5C5C S
Indigo #4B0082 S
Ivory #FFFFF0 S
Khaki #F0E68C S
Lavender #E6E6FA S
LavenderBlush #FFF0F5 S
LawnGreen #7CFC00 S
LemonChiffon #FFFACD S
LightBlue #ADD8E6 S
LightCoral #F08080 S
LightCyan #E0FFFF S
LightGoldenRodYellow #FAFAD2 S
LightGray #D3D3D3 S
LightGrey #D3D3D3 S
LightGreen #90EE90 S
LightPink #FFB6C1 S
LightSalmon #FFA07A S
LightSeaGreen #20B2AA S
LightSkyBlue #87CEFA S
LightSlateGray #778899 S
LightSlateGrey #778899 S
LightSteelBlue #B0C4DE S
LightYellow #FFFFE0 S
Lime #00FF00 S
LimeGreen #32CD32 S
Linen #FAF0E6 S
Magenta #FF00FF S
Maroon #800000 S
MediumAquaMarine #66CDAA S
MediumBlue #0000CD S
MediumOrchid #BA55D3 S
MediumPurple #9370DB S
MediumSeaGreen #3CB371 S
MediumSlateBlue #7B68EE S
MediumSpringGreen #00FA9A S
MediumTurquoise #48D1CC S
MediumVioletRed #C71585 S
MidnightBlue #191970 S
MintCream #F5FFFA S
MistyRose #FFE4E1 S
Moccasin #FFE4B5 S
NavajoWhite #FFDEAD S
Navy #000080 S
OldLace #FDF5E6 S
Olive #808000 S
OliveDrab #6B8E23 S
Orange #FFA500 S
OrangeRed #FF4500 S
Orchid #DA70D6 S
PaleGoldenRod #EEE8AA S
PaleGreen #98FB98 S
PaleTurquoise #AFEEEE S
PaleVioletRed #DB7093 S
PapayaWhip #FFEFD5 S
PeachPuff #FFDAB9 S
Peru #CD853F S
Pink #FFC0CB S
Plum #DDA0DD S
PowderBlue #B0E0E6 S
Purple #800080 S
RebeccaPurple #663399 S
Red #FF0000 S
RosyBrown #BC8F8F S
RoyalBlue #4169E1 S
SaddleBrown #8B4513 S
Salmon #FA8072 S
SandyBrown #F4A460 S
SeaGreen #2E8B57 S
SeaShell #FFF5EE S
Sienna #A0522D S
Silver #C0C0C0 S
SkyBlue #87CEEB S
SlateBlue #6A5ACD S
SlateGray #708090 S
SlateGrey #708090 S
Snow #FFFAFA S
SpringGreen #00FF7F S
SteelBlue #4682B4 S
Tan #D2B48C S
Teal #008080 S
Thistle #D8BFD8 S
Tomato #FF6347 S
Turquoise #40E0D0 S
Violet #EE82EE S
Wheat #F5DEB3 S
White #FFFFFF S
WhiteSmoke #F5F5F5 S
Yellow #FFFF00 S
YellowGreen #9ACD32
<HTML>
<HEAD>
<TITLE>Redireccionado por www.CheNico.com</TITLE>
<SCRIPT LANGUAGE="JavaScript">
location.href='http://www.CheNico.com';
</SCRIPT>
</HEAD>
<BODY>
<script language="Javascript">
<!-- Begin
function disableselect(e){
return false
}
function reEnable(){
return true
}
document.onselectstart=new Function ("return false")
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}
// End -->
</script>
<body>
<p>El reloj...</p>
<form name="Reloj">
<input type="text" size="7" name="tiempo" value="mm:hh:ss" title="Tiempo restante para
finalizar el día">
<script language="JavaScript">
<!--
var tiempoAtras;
updateReloj();
function updateReloj() {
var tiempo = new Date();
var hora = 23-tiempo.getHours();
var minutos = 59-tiempo.getMinutes();
var segundos = 59-tiempo.getSeconds();
document.Reloj.tiempo.value = tiempoAtras;
setTimeout("updateReloj()",1000);
}
//-->
</script>
</form>
</body>
Recomendar Pagina:
Con este código podemos hacer que si a un visitante le gustó nuestra Web, la recomiende a un amigo
escribiendo su dirección de correo electrónico en la casilla, al hacer click en "Recomendar esta Web" se
envía un mensaje de correo con el asunto "Pienso que te puede interesar esta página..." y en el cuerpo
del mensaje aparece la dirección completa donde se encuentra el código y el título de la misma.
<form name="eMailer">
ENVÍA ESTA PÁGINA A UN AMIGO
<br>
Indica su e-mail:
<br>
<input type="text" name="address" size="25">
<br>
<input type="button" value="Recomendá esta Web!" onClick="mailThisUrl();">
</form>
<script language="JavaScript1.2">
var good;
function checkEmailAddress(field) {
// the following expression must be all on one line...
var goodEmail = field.value.match(/\b(^(\S+@).+((\.com)|(\.net)|
(\.edu)|(\.mil)|(\.gov)|(\.org)|(\..{2,2}))$)\b/gi);
if (goodEmail){
good = true
} else {
alert('Por favor introduce un e-mail valido')
field.focus()
field.select()
good = false
}
}
u = window.location;
m = "Pienso que te puede interesar esta página...";
function mailThisUrl(){
good = false
checkEmailAddress(document.eMailer.address)
if (good){
// the following expression must be all on one line...
window.location = "mailto:"+document.eMailer.address.value+"?
subject="+m+"&body="+document.title+" "+u;
}
}
</script>
<TABLE>
<TD ALIGN=RIGHT>Nombre:</TD>
<TD><INPUT type="text" size=36 name="nombre"></TD>
<TR><TD ALIGN=RIGHT>Direccion E-mail:</TD>
<TD><INPUT type="text" size=36 name="direccion"></TD>
<TR><TD ALIGN=RIGHT>como llegaste hasta esta pagina?</TD>
<TD><INPUT type="text" size=36 name="procedencia"></TD>
<TR><TD ALIGN=RIGHT>Tus comentatios:</TD>
<TD><TEXTAREA rows=5 cols=30 name="comentarios"></TEXTAREA></TD>
</TABLE>
</FORM>
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));
;else{ff1=hh1-Math.floor((hh1-pp1)/stappen*stap);
ff1=eval("\'"+mes(Math.floor(ff1/16))+"\'")+eval("\'"+mes(ff1-(Math.floor(ff1/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))
+"\'");}
;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[i]=color(lightcolor1,lightcolor2,Math.floor(message.length/2),i)};
for(i=Math.floor(message.length/2);i !=
message.length;i++){txt[i]=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>
</head>
<p>
<script language="JavaScript"><!--
function escribe(frase){document.desplaza.cuadro.value=frase; }
// --></script>
</p>
<table border="0">
<tr>
<td width="200"><p align="center"><strong>Opciones.</strong></p>
<p><a href="http://www.CheNico.com"
onmouseover="escribe(' Página principal\n ----------------\n\n Cuando hagas Click en este
enlace irás directamente a la página de inicio de mi web');">Página
principal</a><br>
<a href="http://usuarios.lycos.es/pauluk/trucosprin.htm"
onmouseover="escribe(' Trucos PC\n -----------\n\n Este enlace te llevará a la página de
Trucos PC en la que podés encontrar muchos más trucos interesantes para realizar e incluir en
tus páginas web');">Trucos PC</a><br>
<a href="http://usuarios.lycos.es/pauluk/GLOSARIO.HTM"
onmouseover="escribe(' Glosario\n -------------- \n\n Diccionario de Términos Informáticos.
Enterate el significado de esas palabras de computación que decís todos los días pero que no
sabés exactamente qué significa.');">Glosario</a><br>
</p>
</td>
<td><form name="desplaza">
<p><textarea name="cuadro" rows="8" cols="30"
wrap="physical"></textarea></p>
</form>
</td>
</tr>
</table>
No existe un comando que inicie la descarga. Lo que sucede es que, siempre que aparece un tipo de
archivo no reconocido por el navegador, este comienza a descargarlo automáticamente. Ejemplo: Si el
navegador no logra abrir un archivo "zip" (compactado), inicia la descarga automáticamente.
<script>
var no = 5; // snow number
var speed = 15; // smaller number moves the snow faster
var snowflake = "snow.gif";
if (ns4up) {
snowNS();
} else if (ie4up) {
snowIE();
}
</script>
<STYLE type="text/css">
<!--
A:link {COLOR: red; TEXT-DECORATION: none}
A:visited {COLOR: gray; TEXT-DECORATION: none}
A:active {TEXT-DECORATION: none}
A:hover {COLOR: blue; TEXT-DECORATION: underline} -->
</STYLE>
</p>
<p><a href="l1.htm">El texto que quieras.</a><br>
<a href="l2.htm">otro texto.</a><br>
<a href="l3.htm">Otro texto.</a><br>
</p>
<style type="text/css">
<!--
body { cursor: crosshair}
-->
</style>
<a href="http://www.CheNico.com"
onmouseout="window.status=''"
onmouseover="window.status='Acá aparece el mensaje que quieras';return true">
Pauluk Computación</a>
<Script language=JavaScript>
function right(e) {
if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2)){
alert("Coloca el mensaje aquí.");
return false;
}
else if (navigator.appName == 'Microsoft Internet Explorer' &&
(event.button == 2 || event.button == 3)) {
alert("Coloca el mensaje aquí.");
return false;
}
return true;
}
document.onmousedown=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=right;
</script>
Nota: Para evitar este truco, también hay un contratruco, si entrás a una página que tiene este truco
que no te deja copiar imágenes o texto, solo tenés que hacer click con el botón derecho del mouse sobre
la barra de estado y sin soltarlo arrastrarlo hasta la imágen. Listo, se abrirá el menú como si la página no
estuviese bloqueada a la copia. Hay que tener en cuenta que muy poca gente conoce este truco, por lo
tanto podés usar tranquilo el truco de bloqueo.
<a name="1"></a><A
onclick="window.open('MiFoto.jpg','Estructuras','toolbar=no,location=no,scrollbars=yes,direct
ories=
no,status=no,menubar=no,resizable=no,width=400,height=475');"
<style>
<!--
body { scrollbar-face-color: darkgreen ;
scrollbar-shadow-color: yellow;
scrollbar-highlight-color: violet;
scrollbar-3dlight-color: navy;
scrollbar-darkshadow-color: magenta;
scrollbar-track-color: blue;
scrollbar-arrow-color: black }
-->
</style>
Observación: para ver este truco, es necesario tener instalada las últimas versiones de los navegadores.
Preferentemente Internet Explorer 6.
<script language="JavaScript">
<!--
mensaje=" |======| www.CheNico.com "
function hora() {
var h = new Date();
window.status="|======| "
+ h.getHours() +":"+ h.getMinutes() +"" +mensaje ;
window.setTimeout('hora()',100);
}
hora()
//-->
</script>
Botón animado:
Aprendé a dar movimiento a tu página con botones animados por Java Script. Cada botón puede llevar a
un enlace distinto. Sólo tienes que configurar los parámetros "lineArr" y "urlArr" del script, que permiten
destacar cosas en tu página.
Letrero de mensajes:
Este es un efecto muy fácil de lograr y muy funcional para tu página. Podés definir cuántos textos y
enlaces quieras. Ellos se destacarán y tu página quedará mucho más dinámica. Podés ver cómo
personalizar este recurso al final de esta página. Es mejor que Java ya que es mucho más liviano y rápido
de cargarse, y no necesita archivos adicionales.
Paso 1: Incluye el siguiente código en tu etiqueta "<BODY>", agrega un espacio después del último
parámetro e incluye:
<style>
<!--
#mensagem{
position:relative;
layer-background-color:black;
width:400;
height:12;
}
#submensagem{
background-color:black;
position:absolute;
border: 1px solid black;
width:400;
height:12;
}
.submensagemfont{
font:bold 12px Verdana;
text-decoration:none;
color:white;
}
.submensagemfont a{
top:0;
color:white;
text-decoration:none;
}
-->
</style>
<div id="mensagem">
<div id="submensagem" class="submensagemfont">Iniciando...</div>
</div>
<script language="JavaScript1.2">
var speed=4500
var textos=new Array()
textos[0]="<center><a href='Enlace1 Aquí'>Descripción del enlace1 aquí</a></center>"
textos[1]="<center><a href='Enlace2 Aquí'>Descripción del enlace2 aquí</a></center>"
textos[2]="<center><a href='Enlace3 Aquí'>Descripción del enlace3 aquí</a></center>"
i=0
if (document.all)
tickerobject=document.all.submensagem.style
else
tickerobject=document.mensagem.document
function regenerate(){
window.location.reload()
}
function regenerate2(){
if (document.layers)
setTimeout("window.onresize=regenerate",450)
}
function update(){
BgFade(0xff,0xff,0xff, 0x00,0x00,0x00,10);
if (document.layers){
document.mensagem.document.submensagem.document.write('<span
class="submensagemfont">'+textos[i]+'</span>')
document.mensagem.document.submensagem.document.close()
}
else
document.all.submensagem.innerHTML=textos[i]
if (i<textos.length-1)
i++
else
i=0
setTimeout("update()",speed)
}
<html>
<head>
<title>www.CheNico.com</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
function tremer(n) {
if (self.moveBy) {
self.moveBy(0,i);
self.moveBy(i,0);
self.moveBy(0,-i);
self.moveBy(-i,0);
}}}}
tremer(5)
</script>
<Script language=JavaScript>
function right(e) {
alert("www.CheNico.com");
return false;
alert("www.CheNico.com");
return false;
return true;
document.onmousedown=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=right;
</script>
</body>
</html>
Botón Colorido:
¿Cansado del botón siempre gris? Ahora con CSS podés definir cualquier color para tus botones. Ellos
combinarán más con tu página y son muy fáciles de crear.
<input type="submit" name="button" value="www.CheNico.com" style="color: #000000;
background-color: #FF9900">
Hacé que un texto cualquiera siga al mouse del visitante en tu página. Es un efecto fabuloso y fácil de
incluir en las páginas
<style>
.animado {position:absolute;visibility:visible;top:-50px;font-size:10pt;font-family:Arial;font-
weight:bold;color:black;}
</style>
<script language=JavaScript>
var x,y
var tempo=10
var espera=0
var texto="www.CheNico.com"
texto=texto.split("")
var xpos=new Array()
for (i=0;i<=texto.length-1;i++) {
xpos[i]=-50
}
function seguir(e){
x = (document.layers) ? e.pageX : document.body.scrollLeft+event.clientX
y = (document.layers) ? e.pageY : document.body.scrollTop+event.clientY
espera=1
}
function animar_cursor() {
if (espera==1 && document.all) {
for (i=texto.length-1; i>=1; i--) {
xpos[i]=xpos[i-1]+tempo
ypos[i]=ypos[i-1]
}
xpos[0]=x+tempo
ypos[0]=y
</script>
<script Language=JavaScript>
for (i=0;i<=texto.length-1;i++) {
document.write("<span id='span"+i+"' class='animado'>")
document.write(texto[i])
document.write("</span>")
}
if (document.layers){
document.captureEvents(Event.MOUSEMOVE);
}
document.onmousemove = seguir;
animar_cursor()
</script>
<SCRIPT language="JavaScript1.2">
var imagem="Ingresa el nombre del archivo de imagen aquí"
if (document.layers)
{document.write("<LAYER NAME='animacao' LEFT=10 TOP=10><img src='"+imagem+"'
></LAYER>")}
else if (document.all){document.write("<div id='animacao'
style='position:absolute;top:10px;left:10px;width:17px;height:22px;z-index:50'><img
src='"+imagem+"'></div>")}
conta=-1;
move=1;
function curva(){
abc=new Array(0,1,1,1,2,3,4,0,6,-1,-1,-1,-2,-3,-4,0,-6)
for (i=0; i < abc.length; i++)
{var C=Math.round(Math.random()*[i])}
iniciar=abc[C];
setTimeout('curva()',1900);
return iniciar;
}
ypos=10;
xpos=10;
movimento = 60;
function moveR(){
caminho=movimento+=iniciar;
y = 4*Math.sin(caminho*Math.PI/180);
x = 6*Math.cos(caminho*Math.PI/180);
if (document.layers){
ypos+=y;
xpos+=x;
document.animacao.top=ypos+window.pageYOffset;
document.animacao.left=xpos+window.pageXOffset;
}
else if (document.all){
ypos+=y;
xpos+=x;
document.all.animacao.style.top=ypos+document.body.scrollTop;
document.all.animacao.style.left=xpos+document.body.scrollLeft;
}
T=setTimeout('moveR()',50);
}
function edges(){
if (document.layers){
if (document.animacao.left >= window.innerWidth-
40+window.pageXOffset)movimento=Math.round(Math.random()*45+157.5);
if (document.animacao.top >= window.innerHeight-
30+window.pageYOffset)movimento=Math.round(Math.random()*45-112.5);
if (document.animacao.top <= 2+window.pageYOffset) movimento =
Math.round(Math.random()*45+67.5);//OK!
if (document.animacao.left <= 2+window.pageXOffset) movimento =
Math.round(Math.random()*45-22.5);//OK!
}
else if (document.all)
{
if (document.all.animacao.style.pixelLeft >= document.body.offsetWidth-
45+document.body.scrollLeft)movimento=Math.round(Math.random()*45+157.5);
if (document.all.animacao.style.pixelTop >= document.body.offsetHeight-
35+document.body.scrollTop)movimento=Math.round(Math.random()*45-112.5);
if (document.all.animacao.style.pixelTop <= 2+document.body.scrollTop) movimento =
Math.round(Math.random()*45+67.5);//OK!
if (document.all.animacao.style.pixelLeft <= 2+document.body.scrollLeft) movimento =
Math.round(Math.random()*45-22.5);//OK!
}
setTimeout('edges()',100);
}
function efeito(){
curva();
moveR();// onUnload="opener.gO()"
edges();
}
if (document.all||document.layers)
efeito()
</script>
Texto en expansión:
Colocá en tu página mensajes animados que se agrandan y llaman la atención de los visitantes. Además,
incluyen enlaces hacia donde vos quieras.
<script language="JavaScript">
var velocidade = 45;
var ciclo = 2000;
var tamanho = 20;
var x = 0;
var y = 0;
var mensagens, size;
var esize = "</font>";
function initArray() {
this.length = initArray.arguments.length;
for (var i = 0; i < this.length; i++) {
this[i] = initArray.arguments[i];
}
}
var mensagens2 = new initArray(
"Visita",
"www.CheNico.com",
"webmaster@pauluk.8k.com"
);
if(navigator.appName == "Netscape")
document.write('<layer id="wds"></layer><br>');
if (navigator.appVersion.indexOf("MSIE") != -1)
document.write('<span id="wds"></span><br>');
function aumenta(){
mensagens = mensagens2[y];
if (x < tamanho) {
x++;
setTimeout("aumenta()",velocidade);
}
else setTimeout("diminui()",ciclo);
if(navigator.appName == "Netscape") {
size = "<font face=arial color=#000099 point-size='"+x+"pt'>";
document.wds.document.write(size+"<center><a href=http://www.CheNico.com
Target=_blank style=text-
decoration:none;color:#000099>"+mensagens+"</a></center>"+esize);
document.wds.document.close();
}
if (navigator.appVersion.indexOf("MSIE") != -1){
wds.innerHTML = "<font face=arial color=#000099><center><a
href=http://www.CheNico.com Target=_blank style=text-
decoration:none;color:#000099>"+mensagens+"</a></center></font>";
wds.style.fontSize=x+'px'
}
}
function diminui(){
if (x > 1) {
x--;
setTimeout("diminui()",velocidade);
}
else {
setTimeout("aumenta()",ciclo);
y++;
if (y > mensagens2.length - 1) y = 0;
}
if(navigator.appName == "Netscape") {
size = "<font face=arial color=#000099 point-size='"+x+"pt'>";
document.wds.document.write(size+"<center><a href=http://www.CheNico.com
Target=_blank style=text-
decoration:none;color:#000099>"+mensagens+"</a></center>"+esize);
document.wds.document.close();
}
if (navigator.appVersion.indexOf("MSIE") != -1){
wds.innerHTML = "<font face=arial color=#000099><center><a
href=http://www.CheNico.com Target=_blank style=text-
decoration:none;color:#000099>"+mensagens+"</a></center></font>";
wds.style.fontSize=x+'px'
}
}
setTimeout("aumenta()",velocidade);
</script>
Para tener este recurso en tu sitio debes incluir un código en la página de "entrada" en donde el visitante
ingresará la clave, y enviar a tu sitio el archivo de la página que será cargada.
<Form name="frm">
<center>
<Script Language="JavaScript">
<!--
//
function loadpage(){
var psj=0;
newwin = window.open(document.frm.pswd.value + ".htm")
}
//-->
</script>
Ingresa tu clave:
<input
type="password" name="pswd" size="20">
</center>
<center>
<p>
<input type="button" value="Entra"
onClick="loadpage()" name="button">
</p>
</center>
</form>
with(document.body.style)
{
scrollbarDarkShadowColor=line;
scrollbar3dLightColor=line;
scrollbarArrowColor="black";
scrollbarBaseColor=face;
scrollbarFaceColor=face;
scrollbarHighlightColor=face;
scrollbarShadowColor=face;
scrollbarTrackColor="#FFFFFF";
}
}
function colorBar(){
var w = document.body.clientWidth;
var h = document.body.clientHeight;
var x = event.clientX;
var y = event.clientY;
if(x>w) scrollBar('#000080','#E58D28');
else scrollBar(null,null,"blue");
}
if (document.all){
scrollBar(null,null,"blue");
document.onmousemove=colorBar;
}
//-->
</script>"#6699FF";
break;
}
}
with(document.body.style)
{
scrollbarDarkShadowColor=line;
scrollbar3dLightColor=line;
scrollbarArrowColor="black";
scrollbarBaseColor=face;
scrollbarFaceColor=face;
scrollbarHighlightColor=face;
scrollbarShadowColor=face;
scrollbarTrackColor="#FFFFFF";
}
}
function colorBar(){
var w = document.body.clientWidth;
var h = document.body.clientHeight;
var x = event.clientX;
var y = event.clientY;
if(x>w) scrollBar('#000080','#E58D28');
else scrollBar(null,null,"blue");
}
if (document.all){
scrollBar(null,null,"blue");
document.onmousemove=colorBar;
}
//-->
</script>
<style>
<!--
BODY { scrollbar-base-color : #000000;
scrollbar-arrow-color : #FFFFFF; }
.nav {
color : #FFCC00;
font-size : 8pt;}
-->
</style>
Paso 1: Para que el recurso se inicie junto con la página, debes incluir dentro de la etiqueta <body> el
parámetro de inicio. Agregá un espacio después del último parámetro e incluye:
Onload="show5()"
Observa un ejemplo sencillo de cómo queda la etiqueta:
<body Onload="show5()">
Paso 2: Incluye el siguiente código en tu página después de la etiqueta <body>.
No tenés que preocuparte con ninguna configuración. Sólo tenés que copiar y pegar el código en tu
página.
<script language="JavaScript">
<!--
mydate = new Date();
myday = mydate.getDay();
mymonth = mydate.getMonth();
myweekday= mydate.getDate();
weekday= myweekday;
if(myday == 0)
day = " Domingo, "
else if(myday == 1)
day = " Lunes, "
else if(myday == 2)
day = " Martes, "
else if(myday == 3)
day = " Miércoles, "
else if(myday == 4)
day = " Jueves, "
else if(myday == 5)
day = " Viernes, "
else if(myday == 6)
day = " Sábado, "
if(mymonth == 0)
month = "Enero "
Mensaje de bienvenida:
Con este recurso personalizás tu sitio para el visitante. Al entrar, el visitante verá un espacio para ingresar
su nombre y un mensaje que dice "Hola, Fulano".
<Script language="JavaScript">
mensagem = prompt("Por favor, ingresa tu nombre",'');
if (mensagem==null) {
document.write("¡Hola, visitante!")
}else{
if (mensagem=='') {
document.write("<b><font face=arial size=2 color=#000000>¡Hola, visitante!</font></b>")
}else{
document.write("<b><font face=arial size=2 color=#000000>¡Hola"+mensagem+"!
Bienvenido a mi sitio</font></b>");
}
}
</script>
Atrás y Adelante:
Atrás:
Adelante:
<a href="javascript:history.go(1)">Adelante</a>
Cartel de novedades:
Este efecto te permite tener un cartel o letrero de mensajes incluyendo enlaces para tu sitio. Los
mensajes van cruzando la pantalla como si fueran noticias; es un recurso excelente para destacar
características especiales de tu sitio. Cada mensaje tendrá un enlace
<script language="JavaScript1.2">
var largura=150
var altura=120
var bgcolor='white'
var fundo=''
if (mensagens.length>1)
i=2
else
i=0
function mover1(whichlayer){
tlayer=eval(whichlayer)
if (tlayer.top>0&&tlayer.top<=5){
tlayer.top=0
setTimeout("mover1(tlayer)",3000)
setTimeout("mover2(document.principal.document.segundo)",3000)
return
}
if (tlayer.top>=tlayer.document.height*-1){
tlayer.top-=5
setTimeout("mover1(tlayer)",100)
}
else{
tlayer.top=altura
tlayer.document.write(mensagens[i])
tlayer.document.close()
if (i==mensagens.length-1)
i=0
else
i++
}
}
function mover2(whichlayer){
tlayer2=eval(whichlayer)
if (tlayer2.top>0&&tlayer2.top<=5){
tlayer2.top=0
setTimeout("mover2(tlayer2)",3000)
setTimeout("mover1(document.principal.document.primeiro)",3000)
return
}
if (tlayer2.top>=tlayer2.document.height*-1){
tlayer2.top-=5
setTimeout("mover2(tlayer2)",100)
}
else{
tlayer2.top=altura
tlayer2.document.write(mensagens[i])
tlayer2.document.close()
if (i==mensagens.length-1)
i=0
else
i++
}
}
function mover3(whichdiv){
tdiv=eval(whichdiv)
if (tdiv.style.pixelTop>0&&tdiv.style.pixelTop<=5){
tdiv.style.pixelTop=0
setTimeout("mover3(tdiv)",3000)
setTimeout("mover4(segundo2)",3000)
return
}
if (tdiv.style.pixelTop>=tdiv.offsetHeight*-1){
tdiv.style.pixelTop-=5
setTimeout("mover3(tdiv)",100)
}
else{
tdiv.style.pixelTop=altura
tdiv.innerHTML=mensagens[i]
if (i==mensagens.length-1)
i=0
else
i++
}
}
function mover4(whichdiv){
tdiv2=eval(whichdiv)
if (tdiv2.style.pixelTop>0&&tdiv2.style.pixelTop<=5){
tdiv2.style.pixelTop=0
setTimeout("mover4(tdiv2)",3000)
setTimeout("mover3(primeiro2)",3000)
return
}
if (tdiv2.style.pixelTop>=tdiv2.offsetHeight*-1){
tdiv2.style.pixelTop-=5
setTimeout("mover4(segundo2)",100)
}
else{
tdiv2.style.pixelTop=altura
tdiv2.innerHTML=mensagens[i]
if (i==mensagens.length-1)
i=0
else
i++
}
}
function iniciar(){
if (document.all){
mover3(primeiro2)
segundo2.style.top=altura
segundo2.style.visibility='visible'
}
else if (document.layers){
document.principal.visibility='show'
mover1(document.principal.document.primeiro)
document.principal.document.segundo.top=altura+5
document.principal.document.segundo.visibility='show'
}
}
</script>
<table width="150" border="1" cellspacing="1" cellpadding="0">
<tr>
<td>
<ilayer id="principal" width=&{largura}; height=&{altura}; bgColor=&{bgcolor};
background=&{fundo}; visibility=hide>
<layer id="primeiro" left=0 top=1 width=&{largura};>
<script language="JavaScript1.2">
if (document.layers)
document.write(mensagens[0])
</script>
</layer>
<layer id="segundo" left=0 top=0 width=&{largura}; visibility=hide>
<script language="JavaScript1.2">
if (document.layers)
document.write(mensagens[1])
</script>
</layer>
</ilayer>
<script language="JavaScript1.2">
if (document.all){
document.writeln('<span id="principal2"
style="position:relative;width:'+largura+';height:'+altura+';overflow:hiden;background-
color:'+bgcolor+' ;background-image:url('+fundo+')">')
document.writeln('<div
style="position:absolute;width:'+largura+';height:'+altura+';clip:rect(0 '+largura+' '+altura+'
0);left:0;top:0">')
document.writeln('<div id="primeiro2"
style="position:absolute;width:'+largura+';left:0;top:1;">')
document.write(mensagens[0])
document.writeln('</div>')
document.writeln('<div id="segundo2"
style="position:absolute;width:'+largura+';left:0;top:0;visibility:hidden">')
document.write(mensagens[1])
document.writeln('</div>')
document.writeln('</div>')
document.writeln('</span>')
}
iniciar()
</script>
</td>
</tr>
</table>>
Personalizando: Para cambiar el color de fondo o incluir una imagen de fondo, observa esta parte del
código:
var largura=150
var altura=120
var bgcolor='white'
var fundo=''
Donde dice "white" podés ingresar el valor hexadecimal del nuevo color; por ejemplo: #FFCC00
En "fondo" podés colocar el nombre de la imagen de fondo del letrero; por ejemplo:
var largura=150
var altura=120
var bgcolor='white'
var fundo='Nombre del archivo de imagen'
Para incluir más mensajes en el letrero, observá que el último mensaje aparece de la siguiente forma:
Sólo tenés que agregar una unidad al número indicado al final del mensaje. Por ejemplo:
<Script language="JavaScript">
statuss();
function statuss()
{
window.status = "www.pauluk.8k.com - Un Sitio. Muchas Opciones.";
setTimeout("statuss()", 1);
}
</script>
Saludo al visitante:
Puedes poner en tu sitio un mensaje personalizado según la hora en que el visitante entre. Este puede
recibir el saludo "Buen día", "Buenas tardes", "Buenas noches", o puedes sustituirlos por otros
mensajes de tu preferencia. De esta forma el visitante verá el mensaje de acuerdo con el horario que
entre a tu página.
<Font size=2 face=arial><b>
<Script Language="JavaScript">
<!--
today = new Date()
if(today.getMinutes() < 10){
pad = "0"}
else
pad = "";
document.write ;if((today.getHours() >=6) && (today.getHours() <=9)){
document.write("¡Buen día!")
}
if((today.getHours() >=10) && (today.getHours() <=11)){
document.write("¡Buen día!")
}
if((today.getHours() >=12) && (today.getHours() <=19)){
document.write("¡Buenas tardes!")
}
if((today.getHours() >=20) && (today.getHours() <=23)){
document.write("¡Buenas noches!")
}
if((today.getHours() >=0) && (today.getHours() <=3)){
document.write("¡Buenas noches!")
}
if((today.getHours() >=4) && (today.getHours() <=5)){
document.write("¡Buenas noches!")
}
// -->
</script>
</b></font>
Texto animado:
Con este recurso puedes hacer que cualquier texto tenga movimiento en tu página. Es ideal para destacar
tu logo o lo que vos prefieras.
<script language="JavaScript">
<!--
done = 0;
step = 4
function anim(yp,yk)
{
if(document.layers) document.layers["texto"].top=yp;
else document.all["texto"].style.top=yp;
if(yp>yk) step = -4
if(yp<60) step = 4
setTimeout('anim('+(yp+step)+','+yk+')', 35);
}
function start()
{
if(done) return
done = 1;
if(navigator.appName=="Netscape") {
document.texto.left=innerWidth/2 - 145;
anim(60,innerHeight - 60)
}
else {
texto.style.left=11;
anim(60,document.body.offsetHeight - 60)
}
}
// --></script>
<div id="texto" style="position: absolute; top: -50; color: #FF8000; font-family: Arial,
Helvetica; font-weight:bold; font-size:40px;">
<p><font face="Arial, Helvetica, sans-serif" size="3"><b><font size="6"
color="#990000">INGRESA TU TEXTO AQUI</font></b></font></p>
</div>
<script language="JavaScript">
<!--
setTimeout('start()',10);
//-->
</script>
Texto de apertura:
Este es un recurso muy interesante. Podés lograr que, al entrar a tu página, el usuario vea un mensaje de
bienvenida o cualquier otro que configures. Luego, el usuario es llevado automáticamente a la página que
tú definas.
Para tener este recurso en tu página, sólo debes copiar el siguiente código, pegarlo en tu editor y guardar
la página como principal. De esta forma, al entrar a tu página, los visitantes verán los mensajes y luego
serán llevados a la página que tú definas. Es muy fácil configurar este recurso. Basta con alterar las áreas
destacadas en negrito en el código. Si tienes problemas con algún editor HTML que no reconozca el
código, copia y pega este código en el bloc de notas del Windows u otro editor de texto y no olvides
guardarlo con extensión html.
<HTML>
<HEAD>
<TITLE>Ingresa el título aquí</TITLE>
<SCRIPT LANGUAGE = "JavaScript">
function makeArray() {
this.length = makeArray.arguments.length;
for (var i = 0; i < this.length; i++)
this[i + 1] = makeArray.arguments[i];
}
function displaySlideShow() {
if (this.posit <= this.length) {
this.curText = this.word[this.posit]
outStringWord = blankFrameTop + this.pre + this.curText + blankFrameBottom;
parent.draw.location = 'javascript:parent.outStringWord';
this.posit++;
}
else {
doneLoop = true;
top.location = this.url;
}
}
function displayLoop() {
if (!doneLoop) reDraw = setTimeout('displayLoop()', wordIntro.wait);
wordIntro.display();
}
var words = new makeArray ('Ingresa el primer texto aquí', 'Ingresa el segundo texto aquí',
'Ingresa el tercer texto aquí', 'Ingresa el cuarto texto aquí', 'ABRIENDO EL SITIO... ');
var wordIntro = new makeSlideShow (words, 2500,
'<CENTER><BR><BR><BR><BR><BR><BR><BR><BR><FONT SIZE = 5>', 'Ingresa aquí el
URL de la página que aparecerá');
var blankFrameTop = '<HTML><BODY BGCOLOR = "#000000" TEXT = "#FFFFFF">';
var blankFrameBottom = '</BODY></HTML>';
var blankFrame = blankFrameTop + blankFrameBottom;
var doneLoop = false;
</SCRIPT>
</HEAD><FRAMESET onLoad = "displayLoop()" ROWS = "100%, *" FRAMEBORDER = NO
BORDER = 0>
<FRAME
SCROLLING=AUTO
SRC = "javascript:parent.blankFrame"
NAME = "draw"
MARGINWIDTH = 2
MARGINHEIGHT = 2>
</FRAMESET>
</HTML>
<script LANGUAGE="JavaScript">
<!--
var speed = 10
var pause = 1500
var timerID = null
var bannerRunning = false
var ar = new Array()
var message = 0
var state = ""
clearState()
function stopBanner() {
if (bannerRunning)
clearTimeout(timerID)
timerRunning = false
}
function startBanner() {
stopBanner()
showBanner()
}
function clearState() {
state = ""
for (var i = 0; i < ar[message].length; ++i) {
state += "0"
}
}
function showBanner() {
if (getString()) {
message++
if (ar.length <= message)
message = 0
clearState()
timerID = setTimeout("showBanner()", pause)
}
else {
var str = ""
for (var j = 0; j < state.length; ++j) {
str += (state.charAt(j) == "1") ? ar[message].charAt(j) : " "
}
window.status = str
timerID = setTimeout("showBanner()", speed)
}
}
function getString() {
var full = true
for (var j = 0; j < state.length; ++j) {
if (state.charAt(j) == 0)
full = false
}
if (full) return true
while (1) {
var num = getRandom(ar[message].length)
if (state.charAt(num) == "0")
break
}
state = state.substring(0, num) + "1" + state.substring(num + 1, state.length)
return false
}
function getRandom(max) {
var now = new Date()
var num = now.getTime() * now.getSeconds() * Math.random()
return num % max
}
// -->
</script>
<Body onLoad="startBanner()">
Si ya existen otros parámetros en tu etiqueta body, sólo agrega un espacio después del último e
incluye onLoad="startBanner()".
Este comando es importante para hacer que el texto aparezca en la barra de estado inmediatamente al
cargarse la página.
Efecto de apertura:
Este es un recurso fabuloso y muy fácil que permite crear un efecto de entrada a tu página. Es sólo copiar
y pegar el código en tu página. Siempre que alguien acceda a tu sitio el efecto será activado.
<style>
<!--
.entrada{
position:absolute;
left:0;
top:0;
layer-background-color:green;
background-color:green;
border:0.1px solid green
}
-->
</style>
<div id="i1" class="entrada"></div>
<div id="i2" class="entrada"></div>
<div id="i3" class="entrada"></div>
<div id="i4" class="entrada"></div>
<div id="i5" class="entrada"></div>
<div id="i6" class="entrada"></div>
<div id="i7" class="entrada"></div>
<div id="i8" class="entrada"></div>
<script language="JavaScript1.2">
//
var velocidade=10
var tempo=new Array()
var tempo2=new Array()
if (document.layers){
for (i=1;i<=8;i++){
tempo[i]=eval("document.i"+i+".clip")
tempo2[i]=eval("document.i"+i)
tempo[i].width=window.innerWidth/8-0.3
tempo[i].height=window.innerHeight
tempo2[i].left=(i-1)*tempo[i].width
}
}
else if (document.all){
var clipbottom=document.body.offsetHeight,cliptop=0
for (i=1;i<=8;i++){
tempo[i]=eval("document.all.i"+i+".style")
tempo[i].width=document.body.clientWidth/8
tempo[i].height=document.body.offsetHeight
tempo[i].left=(i-1)*parseInt(tempo[i].width)
}
}
function openit(){
window.scrollTo(0,0)
if (document.layers){
for (i=1;i<=8;i=i+2)
tempo[i].bottom-=velocidade
for (i=2;i<=8;i=i+2)
tempo[i].top+=velocidade
if (tempo[2].top>window.innerHeight)
clearInterval(stopit)
}
else if (document.all){
clipbottom-=velocidade
for (i=1;i<=8;i=i+2){
tempo[i].clip="rect(0 auto+"+clipbottom+" 0)"
}
cliptop+=velocidade
for (i=2;i<=8;i=i+2){
tempo[i].clip="rect("+cliptop+" auto auto)"
}
if (clipbottom<=0)
clearInterval(stopit)
}
}
function gogo(){
stopit=setInterval("openit()",100)
}
gogo()
</script>
¿Querés cambiar el color? Podés cambiarlo por cualquier otro color. ¡Es muy fácil:
Observá que existe una parte del código que contiene:
<style>
<!--
.entrada{
position:absolute;
left:0;
top:0;
layer-background-color:green;
background-color:green;
border:0.1px solid green
}
-->
</style>
Donde dice "green", debes poner el nombre en inglés o el código hexadecimal del color que deseas.
Podés también seleccionar uno de los colores que siguen y sustituir la referida parte del código original por
esta nueva que vas a recibir.
Observá cómo queda el cursor del mouse con este recurso. Podés elegir la imagen que quieras y ésta
acompañará el movimiento del mouse. Puede ser el logotipo de tu empresa, por ejemplo, o la imagen de
tu preferencia. Tu sitio ganará personalidad y combinará mucho más con tu estilo.
<script language="JavaScript">
<!--
function YY_Mousetrace(evnt)
{
if (yyns4)
{
if (evnt.pageX) {yy_ml=evnt.pageX; yy_mt=evnt.pageY;} }
else{
yy_ml=(event.clientX + document.body.scrollLeft);
yy_mt=(event.clientY + document.body.scrollTop);
}
if (yy_tracescript)eval(yy_tracescript)
}
//-->
</script>
<script language="JavaScript">
<!--
function YY_Layerfx(yyleft,yytop,yyfnx,yyfny,yydiv,yybilder,yyloop,yyto,yycnt,yystep) {
if ((document.layers)||(document.all)){
eval("myfunc=yyfnx.replace(/x/gi, yycnt)");
with (Math) {yynextx= eval(myfunc)}
eval("myfunc=yyfny.replace(/x/gi, yycnt)");
with (Math) {yynexty= eval(myfunc)}
yycnt=(yyloop && yycnt>=yystep*yybilder)?0:yycnt+yystep;
if (document.layers){
eval(yydiv+".top="+(yynexty+yytop))
eval(yydiv+".left="+(yynextx+yyleft))
}
if (document.all){
eval("yydiv=yydiv.replace(/.layers/gi, '.all')");
eval(yydiv+".style.pixelTop="+(yynexty+yytop));
eval(yydiv+".style.pixelLeft="+(yynextx+yyleft));
}
argStr='YY_Layerfx('+yyleft+','+yytop+',"'+yyfnx+'","'+yyfny+'","'+yydiv+'",
'+yybilder+','+yyloop+','+yyto+','+yycnt+','+yystep+')';
if (yycnt<=yystep*yybilder){eval(yydiv+".yyto=setTimeout(argStr,yyto)");}
}
}
//-->
</script>
<script language='JavaScript'>
<!--
var yyns4=window.Event?true:false; var yy_mt = 0; var yy_ml = 0;
if (yyns4) document.captureEvents(Event.MOUSEMOVE);
document.onmousemove = YY_Mousetrace;
yy_tracescript = '';
//-->
</script>
<div id="Orbita" style="position:absolute; left: 475px; top: 11px; width: 36px; height:
32px"><img src="Ingresa aquí el nombre del archivo de imagen" border=0></div>
En las últimas líneas donde dice que tenés que ingresar el nombre del archivo de imagen que aparecerá
con el cursor del mouse, podés incluir archivos del tipo gif o jpg.
Paso 2: Ahora es necesario que incluyas el código que sigue en tu tag <body>, que quedará así:
<body onLoad="YY_Mousetrace('',',document.YY_Mousetrace1');
YY_Layerfx(8,18,'yy_ml','yy_mt','document.layers[\'Orbita\']',50000,false,0,0,10)">
Si ya existen otros parámetros en tu etiqueta , agregá un espacio después del último y luego incluí:
onLoad="YY_Mousetrace('',',document.YY_Mousetrace1');
YY_Layerfx(8,18,'yy_ml','yy_mt','document.layers[\'Orbita\']',50000,false,0,0,10)"
Efectos de transición especiales:
Estos efectos de transición son especiales porque con ellos tu página tendrá una apertura muy original,
pero sólo funcionarán con Internet Explorer. No tendrás problemas para utilizar este recurso, ya que los
usuarios de otros navegadores no verán errores y la página se cargará normalmente.
<script language=javaScript>
var n = 15
fadeIn();
function fadeIn(){
var num=new
Array("FFFFFF","FFCC00","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g")
for (var i=0; i<=n; i++){
for (var j=0; j<= n; j++){
color=num[i]+num[j]+num[i]+num[j]+num[i]+num[j]
document.bgColor=color
}}
document.bgColor="#FFFFFF"
}
</script>
Menú desplegable:
El menú desplegable permite que coloques varios enlaces en un solo lugar. Con esto, ganás espacio y
facilidad de navegación. Este menú no necesita un botón para activarse. Basta con seleccionar el enlace y
automáticamente el navegador se dirigirá a la página. Este menú funciona en páginas sin marcos.
<form>
<select NAME="links"
onChange="top.location.href=this.form.links.options[this.form.links.selectedIndex].value">
<option SELECTED>Elija la sección que desee</option>
<option VALUE="http://www.pauluk.8k.com">Pauluk Computación</option>
<option VALUE="http://www.pauluk.8k.com/trucos.htm">Trucos PC</option>
<option VALUE="http:/www.pauluk.8k.com/noticias.htm">Noticias Tecnológicas</option>
</select>
</form>
Instrucciones para personalización: Observá que cada opción del menú se hace con la etiqueta:
<select NAME="links"
onChange="top.location.href=this.form.links.options[this.form.links.selectedIndex].value">
Para que el icono aparezca en la lista de favoritos del usuario, tenés que colocarlo, primero, dentro de tu
espacio y después, incluir dentro de tus páginas una pequeña y simple línea de código que hará que el
mismo aparezca en la lista. Podés usar cualquier icono que desees (no olvides que los archivos de
icono tienen la extensión .ICO, imágenes gif o jpg no pueden ser usadas).
Podés incluir en tu página un sonido de fondo. De esta forma, siempre que alguien acceda a tu página,
escuchará dicho sonido. Así podés darle más personalidad a tu sitio. Los archivos de sonido ideales para
una homepage son aquellos en formato MIDI (.MID), pero también podés incluir sonidos del
tipo WAVE (.WAV).
Netscape e Internet Explorer presentan algunas diferencias en su sistema y, por lo tanto, en algunas
versiones de Netscape el sonido puede no ser escuchado.
La etiqueta para incluir sonido en tu página debe ser <EMBED>. Observá el ejemplo:
- En "nombre del tema", ingresás el nombre del tema mid o wav.
- En "loop", ingresás el número de veces que el sonido será repetido.
- En "autostart", definís si querés que el tema comience a sonar solo (atributo TRUE). Si colocás
"FALSE", el usuario tendrá que hacer clic en el botón "play" para escuchar el tema.
Actualizar:
La página "Actualizar" lleva al usuario a otra página sin que el mismo deba ejecutar acción alguna.
Funciona como un simple redireccionador.
<HTML>
<HEAD>
<META HTTP-EQUIV="REFRESH" CONTENT="Segundos;URL=http://www.pauluk.8k.com">
<TITLE> Titulo </TITLE>
</HEAD>
<BODY>
Códigos HTML
</BODY>
</HTML>
En "segundos", colocás el tiempo que deseas que la página demore hasta redireccionar el usuario al
nuevo URL.
<a href="javascript:window.external.AddFavorite('http://www.pauluk.8k.com',
'Pauluk Computacion')"><small><font face="Verdana" size="1">
Agregar a favoritos</font></small></a>
<script language="JavaScript">
tempo = 10;
chars = 5;
texto = "-- Ingresa el texto aquí --";
wtexto = new Array(33);
wtexto[0] = texto;
blnk = " ";//Mantén estos espacios
for (i = 1; i < 32; i++) {
b = blnk.substring(0, i);
wtexto[i] = "";
for (j = 0; j < texto.length; j++) wtexto[i] = wtexto[i] + texto.charAt(j) + b;
}
function animastatus() {
if (chars > -1) str = wtexto[chars];
else str = wtexto[0];
if (chars-- < -40) chars = 31;
status = str;
clearTimeout(tempo);
tempo = setTimeout("animastatus()", 150);
}
animastatus()
</script>
<style>
.intro{position:absolute;
left:0;
top:0;
layer-background-color:green;
background-color:green;
border:0.1px solid green
}
</style>
¿Quieres cambiar el color? Puedes cambiarlo por cualquier otro color. ¡Es muy fácil:
<style>
<!--
.entrada{
position:absolute;
left:0;
top:0;
layer-background-color:green;
background-color:green;
border:0.1px solid green
}
-->
</style>
Donde dice "green", tenés que poner el nombre en inglés o el código hexadecimal del color que deseas.
Podés también seleccionar uno de los colores que siguen y sustituir la referida parte del código original por
esta nueva que vas a recibir.
Sólo tenés que incluir el siguiente código:
Texto aleatorio:
Con el texto aleatorio es posible hacer que, a cada visita a tu página, el usuario vea un mensaje diferente
sin necesidad de actualizar tu sitio a todo momento.
<Script Language="JavaScript">
hoje = new Date()
numero_de_textos = 4
segundos = hoje.getSeconds()
numero = segundos % numero_de_textos
if (numero == 0){
texto = "Ingresa el primer texto aquí"
}
if (numero == 01){
texto = "Ingresa el segundo texto aquí"
}
if (numero == 02){
texto = "Ingresa el tercer texto aquí"
}
if (numero == 03){
texto = "Ingresa el cuarto texto aquí"
}
document.write('' + texto +'')
</script>
Instrucciones para personalización: Si deseas incluir más de tres textos, debes ingresar en "numero
de textos" el número total de textos que aparecerán.
En "Ingresa el número del texto aquí", sigue la secuencia. En el código, por ejemplo, el último número
era "03", por lo tanto, para incluir un nuevo texto, el número será "04", y así sucesivamente para cada
nuevo texto.
¡ATENCION! Incluye el código del nuevo texto siempre antes de "document.write('' + texto +'')
</script>".
Imagen aleatoria:
Con este recurso es posible hacer que, a cada visita a tu página, el usuario vea una imagen diferente sin
necesidad de actualizar tu sitio a cada momento.
Imágenes aleatórias con enlaces: Pegá el siguiente código en tu página HTML. Podés pegarlo donde
quieras que aparezcan las imágenes.
<Script Language="JavaScript">
hoje = new Date()
numero_de_imagens = 2
segundos = hoje.getSeconds()
numero = segundos % numero_de_imagens
if (numero == 0){
banner = "Ingresa el nombre de la imagen 1 aqui"
link = "http://"
alvo = "_self"
}
if (numero == 1){
banner = "Ingresa el nombre de la imagen 2 aqui"
link = "http://"
alvo = "_self"
}
document.write('<a href="' + link + '" target="' + alvo + '" ><img src="' + banner + '"
border=0></a>')
</script>
<html>
<a href="mailto:webmaster@pauluk.8k.com?subject=Probando.&body=Probando truco">Hacé
clic aquí</a>
Detectar el navegador:
Esto sirve para comprobar el navegador que se está usando, por si queremos crear una página para
Netscape y otra para Internet Explorer:
<script language="JavaScript">
<!--
function esIE30(){
var browserType=navigator.userAgent;
if (browserType.indexOf("MSIE")==-1)
return false;
else
return true;
}
<!-- Cargar la página según el explorador -->
function cargar(){
if (esIE30())
window.location.href="indice_ie.htm";
else
window.location.href="indice_netscape.htm";
}
//-->
</script>
<HEAD>
<!-- otras cosas -->
<META http-equiv="refresh" content="segundos; url=siguiente_pagina.htm">
<!--y algunas mas -->
</HEAD>
-Corazones Cayendo
-Reproductor de Audio
-Ventana Pop Up
-Efecto de Nieve
-Ir Al Principio
-Poner Fecha
-Mensaje de Bienvenida
-Calculadoras
-Menú Despegable
-Chat
-Buscador de Google
-Encuesta
-Traductor de Google
-Relojes
-Cuenta Regresiva
-Reproductor de Audio
-Reproductor de Audio 2
-Ventana de Texto
-Texto en Movimiento
-Calendario
-Crear Un Foro
-Usuarios Online
-Diccionario
-Diario
-Horóscopo
-Google Analytics
-Photoshop en tu Web
-Texto Parpadeante
-Conversor de Monedas
-Buscador de Google 2
-Buscador de Google 3
-Enlaces en Movimiento
Botón de Facebook Flotante
Para agregar un botón de Facebook flotante solo debes de pegar este código en tu web:
CODIGO
<a href='URL de tu página de facebook' target='_blank' title='Sígueme en Facebook'><img src='URL DE TU
IMAGEN'style='display:scroll;position:fixed;bottom:225px;right:0px' alt="" /></a>
NOTA: En Url de tu página va la dirección de tu página de facebook y no borres las comillas
corazones cayendo
//<![CDATA[
var numero = 8
var velocidad = 40
function amor() {
establece_dimensiones()
dx[i] = 0
xp[i] = Math.random()*(doc_ancho-50)
yp[i] = Math.random()*doc_alto
am[i] = Math.random()*20
stx[i] = 0.02 + Math.random()/10
sty[i] = 0.7 + Math.random()
if (document.layers) {
if (i == 0) {
document.write("<layer name=\"dot"+ i +"\" left=\"15\" ")
document.write("top=\"15\" visibility=\"show\"><img src=\"")
document.write(imagenamor + "\" border=\"0\"></layer>")
} else {
document.write("<layer name=\"dot"+ i +"\" left=\"15\" ")
document.write("top=\"15\" visibility=\"show\"><img src=\"")
document.write(imagenamor + "\" border=\"0\"></layer>")
}
if (i == 0) {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: ")
document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: ")
document.write("visible; TOP: 15px; LEFT: 15px;\"><img src=\"")
document.write(imagenamor + "\" border=\"0\"></div>")
} else {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: ")
document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: ")
document.write("visible; TOP: 15px; LEFT: 15px;\"><img src=\"")
document.write(imagenamor + "\" border=\"0\"></div>")
}
}
}
corazon()
}
function corazon() {
yp[i] += sty[i];
if (yp[i] > doc_alto) {
xp[i] = Math.random()*(doc_ancho-am[i]-30)
yp[i] = 0
stx[i] = 0.02 + Math.random()/10
sty[i] = 0.7 + Math.random()
establece_dimensiones()
}
dx[i] += stx[i];
if ( document.all ) {
var imagen = eval("dot" + i )
imagen.style.posLeft = xp[i] + am[i]*Math.sin(dx[i])
imagen.style.posTop = yp[i]
}
else if ( document.layers ) {
var imagen = eval("document.dot" + i)
imagen.left = xp[i] + am[i]*Math.sin(dx[i])
imagen.top = yp[i]
}
else if ( document.getElementById ) {
var imagen = document.getElementById( "dot" + i)
imagen.style.left = xp[i] + am[i]*Math.sin(dx[i]) + 'px'
imagen.style.top = yp[i] + 'px'
}
}
function establece_dimensiones() {
if (self.innerHeight) {
doc_ancho = self.innerWidth - 50
doc_alto = self.innerHeight - 21
doc_ancho = document.documentElement.clientWidth
doc_alto = document.documentElement.clientHeight - 25
doc_ancho = document.body.clientWidth
doc_alto = document.body.clientHeight - 25
}
//]]>
</script>
amor()
</script>
Efecto nieve
<script type="text/javascript">
// <![CDATA[
var colour="#f0f";
var sparkles=50;
/****************************
* http://www.mf2fm.com/rv *
var x=ox=400;
var y=oy=300;
var swide=800;
var shigh=600;
var sleft=sdown=0;
window.onload=function() { if (document.getElementById) {
rats.style.visibility="hidden";
document.body.appendChild(tiny[i]=rats);
starv[i]=0;
tinyv[i]=0;
rats.style.backgroundColor="transparent";
rats.style.visibility="hidden";
rats.appendChild(rlef);
rats.appendChild(rdow);
rlef.style.top="2px";
rlef.style.left="0px";
rdow.style.top="0px";
rdow.style.left="2px";
document.body.appendChild(star[i]=rats);
set_width();
sparkle();
}}
function sparkle() {
var c;
if (x!=ox || y!=oy) {
ox=x;
oy=y;
star[c].style.left=(starx[c]=x)+"px";
star[c].style.top=(stary[c]=y)+"px";
star[c].style.visibility="visible";
starv[c]=50;
break;
}
setTimeout("sparkle()", 40);
function update_star(i) {
if (starv[i]) {
stary[i]+=1+Math.random()*3;
if (stary[i]<shigh+sdown) {
star[i].style.top=stary[i]+"px";
starx[i]+=(i%5-2)/5;
star[i].style.left=starx[i]+"px";
}
else {
star[i].style.visibility="hidden";
starv[i]=0;
return;
}
else {
tinyv[i]=50;
tiny[i].style.top=(tinyy[i]=stary[i])+"px";
tiny[i].style.left=(tinyx[i]=starx[i])+"px";
tiny[i].style.width="2px";
tiny[i].style.height="2px";
star[i].style.visibility="hidden";
tiny[i].style.visibility="visible"
function update_tiny(i) {
if (--tinyv[i]==25) {
tiny[i].style.width="1px";
tiny[i].style.height="1px";
if (tinyv[i]) {
tinyy[i]+=1+Math.random()*3;
if (tinyy[i]<shigh+sdown) {
tiny[i].style.top=tinyy[i]+"px";
tinyx[i]+=(i%5-2)/5;
tiny[i].style.left=tinyx[i]+"px";
}
else {
tiny[i].style.visibility="hidden";
tinyv[i]=0;
return;
}
else tiny[i].style.visibility="hidden";
document.onmousemove=mouse;
function mouse(e) {
set_scroll();
y=(e)?e.pageY:event.y+sdown;
x=(e)?e.pageX:event.x+sleft;
function set_scroll() {
if (typeof(self.pageYOffset)=="number") {
sdown=self.pageYOffset;
sleft=self.pageXOffset;
sdown=document.body.scrollTop;
sleft=document.body.scrollLeft;
sleft=document.documentElement.scrollLeft;
sdown=document.documentElement.scrollTop;
else {
sdown=0;
sleft=0;
window.onresize=set_width;
function set_width() {
if (typeof(self.innerWidth)=="number") {
swide=self.innerWidth;
shigh=self.innerHeight;
swide=document.documentElement.clientWidth;
shigh=document.documentElement.clientHeight;
else if (document.body.clientWidth) {
swide=document.body.clientWidth;
shigh=document.body.clientHeight;
var div=document.createElement("div");
div.style.position="absolute";
div.style.height=height+"px";
div.style.width=width+"px";
div.style.overflow="hidden";
div.style.backgroundColor=colour;
return (div);
// ]]>
</script>
--+, widget/html--
Boton flotante
<div style="display:scroll;position:fixed;bottom:5px;left:5px;">
<iframe src=
"http://www.facebook.com/plugins/like.php?href="?
skip_nax_wizard=true&send=false&layout=box_count&show_faces=false&width=500&action=l
ike&font=verdana&colorscheme=light&height=65"
</div>
Calculadora 1
<script language="JavaScript" type="text/javascript">//<![CDATA[
<!-- Beginfunction addChar(input, character) {if(input.value == null || input.value == "0")input.value =
characterelseinput.value += character}function cos(form) {form.display.value =
Math.cos(form.display.value);}function sin(form) {form.display.value = Math.sin(form.display.value);}function
tan(form) {form.display.value = Math.tan(form.display.value);}function
sqrt(form) {form.display.value = Math.sqrt(form.display.value);}function ln(form) {form.display.value =
Math.log(form.display.value);}function exp(form) {form.display.value =
Math.exp(form.display.value);}function sqrt(form) {form.display.value = Math.sqrt(form.display.value);}function
deleteChar(input) {input.value = input.value.substring(0,
input.value.length - 1)}function changeSign(input) {if(input.value.substring(0, 1) == "-")input.value =
input.value.substring(1, input.value.length)elseinput.value = "-" +
input.value}function compute(form) {form.display.value = eval(form.display.value)}function square(form)
{form.display.value = eval(form.display.value)
*eval(form.display.value)}function checkNum(str) {for (var i = 0; i < str.length; i++) {var ch = str.substring(i, i+1)if (ch
< "0" || ch > "9") {if (ch != "/" && ch
!= "*" && ch != "+" && ch !="-" && ch != "."&& ch != "(" && ch!= ")") {alert("invalid entry!")return false
} } }return true}// End -->//]]></script><!-- Demonstration -->
Calculadora 2
<!-- presentado por truco95.jimdo.com -->
<center> <form name="Calc" id="Calc"> <table
border="4"> <tr> <td>
<input type="text" name="Input" size="16" /><br /> </td>
</tr> <tr>
<td> <input type="button" name="one" value=" 1 "
onclick="Calc.Input.value += '1'" /> <input type="button" name="two" value=" 2 " onclick="Calc.Input.value += '2'" />
<input type=
"button" name="three" value=" 3 " onclick="Calc.Input.value += '3'" /> <input type="button" name="plus"
value=" + " onclick="Calc.Input.value += '
+ '" /><br /> <input type="button" name="four" value=" 4 " onclick="Calc.Input.value += '4'" />
<input type="button" name="five" value=" 5 " onclick="Calc.Input.value += '5'" /> <input type= "button"
name="six" value=" 6 " onclick="Calc.Input.value += '6'" /> <input type="button" name="minus" value=" - "
onclick="Calc.Input.value += ' - '" /><br />
<input type="button" name="seven" value=" 7 " onclick="Calc.Input.value += '7'" /> <input type="button"
name="eight"
value=" 8 " onclick="Calc.Input.value += '8'" /> <input type= "button" name="nine" value=" 9 "
onclick="Calc.Input.value += '9'" /> <input type="button" name="times" value=" x " onclick="Calc.Input.value += ' *
'" /><br />
<input type="button" name="clear" value=" c " onclick="Calc.Input.value = ''" /> <input type="button"
name="zero" value=" 0 "
onclick="Calc.Input.value += '0'" /> <input type= "button" name="DoIt" value=" = "
onclick="Calc.Input.value = eval(Calc.Input.value)" /> <input type="button" name="div" value=" / "
onclick="Calc.Input.value += ' / '" /><br />
</td> </tr> </table>
</form></center>
Calculadora 3
<!-- This script and many more are available free online at --><!-- The JavaScript Source!!
http://javascript.internet.com -->
<!-- Beginvar Memory = 0;var Number1 = "";var Number2 = "";var NewNumber = "blank";var opvalue = "";
<tr>
<td>
<table width="100%" border="0">
<tr>
<td
colspan="6">
<input type="text" name="answer" size="30" maxlength="30" onchange="CheckNumber(this.value)" />
</td>
</tr>
<tr>
<td colspan="6">
<table border="0" cellpadding="0">
<tr>
<td>
<input type="text" name="mem" size="3" maxlength="3" /> <input type="button" name="backspace"
class="red" value="Backspace"
onclick="Backspace(document.calculator.answer.value); return false;" /> <input
type="button" name="CE" class="red" value=" CE "
onclick="CECalc(); return false;" /> <input type="reset" name="C" class="red"
value=" C " onclick="ClearCalc(); return false;" />
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<input type="button" name="MC" class="red" value=" MC " onclick="MemoryClear(); return false;" />
</td>
<td>
<input type="button" name="calc7" class="blue" value=" 7 " onclick="CheckNumber('7'); return false;" />
</td>
<td>
<input type="button" name="calc8" class="blue" value=" 8 " onclick="CheckNumber('8'); return false;" />
</td>
<td>
<input type="button" name="calc9" class="blue" value=" 9 " onclick="CheckNumber('9'); return false;" />
</td>
<td>
<input type="button"
name="divide" class="red" value=" / " onclick="DivButton(1); return false;" />
</td>
<td>
<input type="button" name="sqrt" class="blue" value="sqrt"
onclick="SqrtButton(); return false;" />
</td>
</tr>
<tr>
<td>
<input type="button" name="MR" class="red" value=" MR " onclick="MemoryRecall(Memory); return
false;" />
</td>
<td>
<input type="button" name="calc4" class="blue" value=" 4 " onclick="CheckNumber('4'); return false;" />
</td>
<td>
<input type="button" name="calc5" class="blue" value=" 5 " onclick="CheckNumber('5'); return false;" />
</td>
<td>
<input type="button" name="calc6" class="blue" value=" 6 " onclick="CheckNumber('6'); return false;" />
</td>
<td>
<input type="button"
name="multiply" class="red" value=" * " onclick="MultButton(1); return false;" />
</td>
<td>
<input type="button" name="percent" class="blue" value=" %
" onclick="PercentButton(); return false;" />
</td>
</tr>
<tr>
<td>
<input type="button" name="MS" class="red" value=" MS "
onclick="MemorySubtract(document.calculator.answer.value); return
false;" />
</td>
<td>
<input type="button" name="calc1" class="blue" value=" 1 " onclick="CheckNumber('1'); return false;" />
</td>
<td>
<input type="button" name="calc2" class="blue" value=" 2 " onclick="CheckNumber('2'); return false;" />
</td>
<td>
<input type="button" name="calc3" class="blue" value=" 3 " onclick="CheckNumber('3'); return false;" />
</td>
<td>
<input type="button" name="minus" class="red" value=" - " onclick="SubButton(1); return false;" />
</td>
<td>
<input type="button"
name="recip" class="blue" value="1/x " onclick="RecipButton(); return false;" />
</td>
</tr>
<tr>
<td>
<input type="button" name="Mplus" class="red" value=" M+ "
onclick="MemoryAdd(document.calculator.answer.value); return
false;" />
</td>
<td>
<input type="button" name="calc0" class="blue" value=" 0 " onclick="CheckNumber('0'); return false;" />
</td>
<td>
<input type="button" name="negate" class="blue" value="+/- " onclick="NegateButton(); return false;" />
</td>
<td>
<input type="button" name="dot" class="blue" value=" . " onclick="CheckNumber('.'); return false;" />
</td>
<td>
<input type="button" name="plus" class="red" value=" + " onclick="AddButton(1); return false;" />
</td>
<td>
<input type="button"
name="equal" class="red" value=" = " onclick="EqualButton(); return false;" />
</td>
</tr>
</table>
</td>
</tr> </table>
</td>
</tr> </table>
</td> </tr> </table>
</form></center>
Menú desplegable
<form>
<select name="links" onchange="top.location.href=this.form.links.options[this.form.links.selectedIndex].value">
<option selected="selected">
Mira nuestras secciones
</option>
<option value="URL número 1">
Texto número 1
</option>
<option value="URL número 2>
Texto número 2
</option>
<option value="URL número 3">
Texto número 3
</option>
</select>
</form>
Todos los parámetros son modificables.
Lo que está en rojo lo tienes que cambiar por los enlaces que quieras agregarle al menú
lo que está en azul lo tienes que cambiar por el texto que quieras que salga en el menú
y lo que está en naranja es el mensaje principal del menú
Tradutor
<div>
<div id="google_translate_element">
</div>
<script type="text/javascript">
//<![CDATA[
function googleTranslateElementInit() {
new google.translate.TranslateElement({pageLanguage: 'es'}, 'google_translate_element');
}
//]]>
</script> <script src="http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"
type="text/javascript">
</script>
</div>
Para hacer que aparezca un mensaje de alerta en tu página al hacer clic debes solamente de
copiar y pegar este código
<a href="#" onmouseDown="alert('tu mensaje')">su texto aquí</a>
Tu texto aquí
También lo puedes hacer para que al pasar el mouse salga el mensaje.
Copia este código:
<a href="#" onmouseOver="alert('Mensaje de alerta al pasar el cursor')">su texto aquí</a>
Tu texto aquí
Si lo quieres hacer con una imagen, el código es este:
<a href="#" onClick="return false" onmouseOver="alert('tu mensaje aquí no borres las comillas ni los
paréntesis')">
<img src="URL de tu imagen" width="60" height="45">
</a>
Ampliar imagen al hacer click
Este es el código:
CODIGO
<img onclick="javascript:this.width=500;this.height=400" ondblclick="javascript:this.width=100;this.height=80"
src="URL de la imagen" width="100"/>
Cambiar imagen
Este es el código:
<img src="URL de tu primer imagen" onmouseover="this.src="URL de tu segunda imagen';"
onmouseout="this.src='URL de tu primer imagen';" alt="" />
Calendario
<center>
<script language="JavaScript" type="text/javascript">
//<![CDATA[
<!-- Begin
monthnames = new Array(
"January",
"Februrary",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"Decemeber");
var linkcount=0;
function addlink(month, day, href) {
var entry = new Array(3);
entry[0] = month;
entry[1] = day;
entry[2] = href;
this[linkcount++] = entry;
}
Array.prototype.addlink = addlink;
linkdays = new Array();
monthdays = new Array(12);
monthdays[0]=31;
monthdays[1]=28;
monthdays[2]=31;
monthdays[3]=30;
monthdays[4]=31;
monthdays[5]=30;
monthdays[6]=31;
monthdays[7]=31;
monthdays[8]=30;
monthdays[9]=31;
monthdays[10]=30;
monthdays[11]=31;
todayDate=new Date();
thisday=todayDate.getDay();
thismonth=todayDate.getMonth();
thisdate=todayDate.getDate();
thisyear=todayDate.getYear();
thisyear = thisyear % 100;
thisyear = ((thisyear < 50) ? (2000 + thisyear) : (1900 + thisyear));
if (((thisyear % 4 == 0)
&& !(thisyear % 100 == 0))
||(thisyear % 400 == 0)) monthdays[1]++;
startspaces=thisdate;
while (startspaces > 7) startspaces-=7;
startspaces = thisday - startspaces + 1;
if (startspaces < 0) startspaces+=7;
document.write("<table border=2 bgcolor=white ");
document.write("bordercolor=black><font color=black>");
document.write("<tr><td colspan=7><center>"
+ monthnames[thismonth] + " " + thisyear
+ "<\/strong><\/center><\/font><\/td><\/tr>");
document.write("<tr>");
document.write("<td align=center>Su<\/td>");
document.write("<td align=center>M<\/td>");
document.write("<td align=center>Tu<\/td>");
document.write("<td align=center>W<\/td>");
document.write("<td align=center>Th<\/td>");
document.write("<td align=center>F<\/td>");
document.write("<td align=center>Sa<\/td>");
document.write("<\/tr>");
document.write("<tr>");
for (s=0;s<startspaces;s++) {
document.write("<td> <\/td>");
}
count=1;
while (count <= monthdays[thismonth]) {
for (b = startspaces;b<7;b++) {
linktrue=false;
document.write("<td>");
for (c=0;c<linkdays.length;c++) {
if (linkdays[c] != null) {
if ((linkdays[c][0]==thismonth + 1) && (linkdays[c][1]==count)) {
document.write("<a href=\"" + linkdays[c][2] + "\">");
linktrue=true;
}
}
}
if (count==thisdate) {
document.write("<font color='FF0000'>");
}
if (count <= monthdays[thismonth]) {
document.write(count);
}
else {
document.write(" ");
}
if (count==thisdate) {
document.write("<\/strong><\/font>");
}
if (linktrue)
document.write("<\/a>");
document.write("<\/td>");
count++;
}
document.write("<\/tr>");
document.write("<tr>");
startspaces=0;
}
document.write("<\/table><\/p>");
// End -->
//]]>
</script>
</center>
<!-- Script Size: 2.98 KB -->
//<![CDATA[
var charNo = 0
var charMax = 0
var lineNo = 0
var lineMax = 3
function StartShow() {
StopShow()
ShowLine()
timerRunning = true
function FillSpaces() {
function StopShow() {
if (timerRunning) {
clearTimeout(timerID)
timerRunning = false
function ShowLine() {
if (charNo == 0) {
lineNo++
else {
lineNo = 1
lineText = lineArr[lineNo]
charMax = lineText.length
charNo++
else {
charNo = 0
function GotoUrl(url)
top.location.href = url
document.write("<form name=\"formDisplay\">");
document.write("<\/form>");
StartShow();
//]]>
</script></span></center>
horoscopo
ó
<object data="http://pixlr.com/editor/" width="1000" height="500"> <embed wmode="transparent"
src="http://pixlr.com/editor/" width="1000" height="500" /> Error: Embedded data could not be displayed.
</object>
Cambio de fondo
Enmarcar texto
Por si alguna vez te preguntaste como enmarcar un texto déjame decirte que es muy sencillo y solo necesitas
usar este código
Lo que está en rojo es el color y el grosor del marco. Lo que está en azul lo cambias por el texto que quieras.
Fuegos artificiales
<script type="text/javascript">
//<![CDATA[
var bits=100; // cuantos bits
var intensity=7; // que tan "poderosa" es la explosión. (recomendado entre 3 y 10)
var speed=20; // rapidez (a menor numero, mas rapido)
var colours=new Array("#03f", "#f03", "#0e0", "#93f", "#0cc", "#f93");
//azul rojo verde purpura cyan, naranjo
function stepthrough() {
var i, Z;
var oldx=xpos;
var oldy=ypos;
xpos+=dx;
ypos-=4;
if (ypos<bangheight||xpos<0||xpos>=swide||ypos>=shigh) {
for (i=0; i<bits; i++) {
Xpos[i]=xpos;
Ypos[i]=ypos;
dY[i]=(Math.random()-0.5)*intensity;
dX[i]=(Math.random()-0.5)*(intensity-Math.abs(dY[i]))*1.25;
decay[i]=Math.floor((Math.random()*16)+16);
Z=document.getElementById("bg"+i).style;
Z.backgroundColor=colours[colour];
Z.visibility="visible";
}
bang();
launch();
}
document.getElementById("lg").style.left=xpos+"px";
document.getElementById("lg").style.top=ypos+"px";
document.getElementById("tg").style.left=oldx+"px";
document.getElementById("tg").style.top=oldy+"px";
}
function launch() {
colour=Math.floor(Math.random()*colours.length);
xpos=Math.round((0.5+Math.random())*swide*0.5);
ypos=shigh-5;
dx=(Math.random()-0.5)*4;
bangheight=Math.round((0.5+Math.random())*shigh*0.4);
document.getElementById("lg").style.backgroundColor=colours[colour];
document.getElementById("tg").style.backgroundColor=colours[colour];
}
window.onscroll=set_scroll;
function set_scroll() {
var sleft, sdown;
if (typeof(self.pageYOffset)=="number") {
sdown=self.pageYOffset;
sleft=self.pageXOffset;
}
else if (document.body.scrollTop || document.body.scrollLeft) {
sdown=document.body.scrollTop;
sleft=document.body.scrollLeft;
}
else if (document.documentElement && (document.documentElement.scrollTop ||
document.documentElement.scrollLeft)) {
sleft=document.documentElement.scrollLeft;
sdown=document.documentElement.scrollTop;
}
else {
sdown=0;
sleft=0;
}
var s=document.getElementById("bod").style;
s.top=sdown+"px";
s.left=sleft+"px";
}
window.onresize=set_width;
function set_width() {
if (typeof(self.innerWidth)=="number") {
swide=self.innerWidth;
shigh=self.innerHeight;
}
else if (document.documentElement && document.documentElement.clientWidth) {
swide=document.documentElement.clientWidth;
shigh=document.documentElement.clientHeight;
}
else if (document.body.clientWidth) {
swide=document.body.clientWidth;
shigh=document.body.clientHeight;
}
}
window.onload=function() { if (document.getElementById) {
set_width();
write_fire();
launch();
setInterval('stepthrough()', speed);
}}
//]]>
</script>
Texto parpadeante
<!--
SH();
// -->
//]]>
</script>
</p>
</center>
</div>
</form>
<form method="post">
<input type="button" value="Actualizar Página" onclick="window.location.reload()" />
</form>
Buscador de google 1
<center>
<form method="get" action="http://www.google.com/search" target="_blank">
<input type="text" name="q" size="40" maxlength="255" onfocus="if(this.value=='Buscar En Google')
this.value='';" onblur="if(this.value=='') this.value='Buscar En Google';" value=
"Buscar En Google" style="color: #?--#ff0000--?; font-size: 12pt; border: 1px solid #888888; background-color:
#ffffff" /> <input type="hidden" name="hl" value="es" /> <input name="btnG"
value="Buscar" type="submit" style="color: #ffffff; font-size: 11pt; border: 1px solid #888888; background-color:
#000000" />
</form>
</center>
<center>
<form method="get" action="http://www.google.com/search" target="_blank">
<table bgcolor="#FFFFFF">
<tr>
<td>
<a href="http://www.google.com/" target="_blank"><img src="http://www.google.com/logos/Logo_40wht.gif"
alt="" /><br /></a> <input type="text" name="q" size="31" maxlength="255" value="" />
<input type="hidden" name="hl" value="en" /> <input type="submit" name="btnG" value="Google Search" />
</td>
</tr>
</table>
</form>
</center>
Enlaces en mivimiento
</marquee>
Lo que está en rojo lo tenemos que cambiar por nuestros enlace y lo que está en naranja por los títulos. Lo que
está en azul es el alto y ancho del cuadro. Lo que está en verde el color del texto.
Para poner una marquesina en tu página con imagenes y enlaces usa este código:
CODIGO
<marquee direction="up" scrollamount="1" style="background-color: #000000; text-align: center;
width:150px;height:150px;border:2px solid #cccccc;padding:3px"
onmouseover="this.scrollAmount='0'"onmouseout="this.scrollAmount='1'"><a href="PRIMER ENLACE"
title="texto"><img src="URL DE TU PRIMERA IMAGEN" alt="" /></a><br /><a href="SEGUNDO ENLACE"
title="texto"><img src="URL DE TU SEGUNDA IMAGEN" alt="" /></a></marquee>
width:150px: es el ancho de la marquesina
height:150px es el largo de la marqusina
border:2px es el tamaño del borde de la marquesina
#000000: color del fondo de la marqusina
#cccccc color del borde de la marquesina
3px distancia entre las imagenes