Trucos HTML
Trucos HTML
Pareja Perfecta
http://l.inccel.com/plus/?l=401
Descubre la Compatibilidad con tu Pareja
Click aqu
Compartir Twittear
<script src="http://h1.flashvortex.com/display.php?id=2_1294291317_52613_387_0_174_139_9_1_97"
type="text/javascript"></script>
Buscador de google:
<!-- Bsqueda Google --> <p> </p> <center> <form action="http://www.google.com/search"
method="get"> <table bgcolor="#ffffff"> <tbody> <tr> <td><a href="www.google.es/"
_fcksavedurl="www.google.es/" _fcksavedurl="www.google.es/"><img alt="Google"
align="absMiddle" border="0" src="http://www.google.com/logos/Logo_40wht.gif"
_fcksavedurl="http://www.google.com/logos/Logo_40wht.gif"
_fcksavedurl="http://www.google.com/logos/Logo_40wht.gif" /></a> <input maxlength="255"
size="31" name="q" /> <input type="hidden" name="hl" value="es" /> <input type="submit"
name="btnG" value="Bsqueda Google" />
<br>
<script language="JavaScript">
<!-- Begin
var week = new Array("D", "L", "M", "Mi", "J", "V", "S"
var monthdays = new Array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
var today = new Date();
var month = today.getMonth();
var day = today.getDay();
var dayN = today.getDate();
var days = monthdays[month];
if (month == 1) {
var year = today.getYear();
if (year%4 == 0) days = 29;
document.write("<tr>"
document.write("</td>"
document.write("</tr>"
var jumped = 0;
var inserted = 1;
var start = day - dayN%7 + 1;
if (start < 0) start += 7;
var weeks = parseInt((start + days)/7);
if ((start + days)%7 != 0) weeks++;
document.write("<tr>"
document.write("<td>"
if (jumped<start || inserted>days) {
document.write("<div align='center'></div>"
jumped++;
}
else {
inserted++;
}
document.write("</td>"
document.write("</tr>"
document.write("</table>"
// End -->
</scr
pt> <
td> </tr
</table>
</center> <div alig
="center"
<center> <table border="0" cellpadding="0" cellspacing="0"
idth=
10">
<tr> <td> <p align="center"><a href="http://www.creatupropiaweb.com"><font size="1" colo
r="#CEDDF4" face="Times New Roman">CTPW</fon
></a><
td> </tr
</table> </ce
er><!---- codigo para mause
y bueno)
<sty
e> body { cursor:url(http://www.creatupropiaweb.com/elect
ik.cur);
</style> Codigo para que las palavras en el menu
"alternate
">AQUI TEXT
Por ejemplo, la marca <BGSOUND> funciona slo con MSIE pero no con
Navigator (LOOP indica el nmero de veces que debe repetirse el midi):
<BGSOUND SRC="imagine.mid" LOOP=INFINITE>
Haz clic aqu tanto con MSIE como con Navigator para probar.
Adems de los archivos MIDI, con la marca <BGSOUND> es posible insertar
archivos .WAV y .AU
Para permitir la apertura automtica de un archivo audio tambin con
Netscape, hay que usar la marca <EMBED>:
<EMBED SRC="imagine.mid" AUTOSTART=true LOOP=true
VOLUME="80" WIDTH="0" HEIGHT="0">
Haz clic aqu tanto con MSIE como con Navigator para probar.
Tambin en este comando adems de los archivos MIDI es posible insertar
archivos .WAV y .AU
Una de las rmoras para la insercin de archivos midi en las propias
pginas, obedece al hecho de que, cada vez que se cambia pgina, el
archivo musical se interrumpe bruscamente. El problema no subsiste en los
sitios divididos en marcos (frames), ya que el archivo musical se carga en el
marco fijo y, por tanto, no cambia cuando se pasa pgina en los otros
marcos. Y por lo que respecta a los sitios sin marco? Una pequea
estratagema que toma piede los marcos puede ser la de construir una pgina
con un marco "invisible".
Para ello, se crea una pgina con el siguiente cdigo:
<FRAMESET rows="0,*" border=0 frameborder="0" framespacing="0">
<frame me name="alto" src="top.htm" noresize>
<frame me name="centrale" src="central.htm" noresize>
</FRAMESET>
donde en el marco "alto" insertaremos el cdigo que invoca el archivo audio:
<EMBED SRC="imagine.mid" AUTOSTART=true LOOP=true VOLUME="80"
WIDTH="0" HEIGHT="0">
y en el marco "central" el contenido de las pginas.
Para probar, haz clic aqu.
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("light
f1()",50)}
< /script>
< /head>
< body bgcolor="#FFFFFF" background="globulos.jpg">
< !--inicio del body -->
< center><h1><div id="light"></div></h1>
< script>
lightcolor1="FF0000" // color
lightcolor2="33CC66" // color
message="Ttulo que cambia de colores" // introduce el texto
lightf()
< /script>
< /center>
< !--fin del body -->
Las dos barras invertidas al comienzo de una lnea, significa que esta es
solo un comentario, se pueden eliminar completamente.
onmouseout="javascript:
void(document.getElementById('vinc').style.fontSize='1em')">
Vnculo</a></div>
4- Mensaje de confirmacin antes de enviar el usuario a una pgina. Prubalo:
Vnculo
<a href="javascript:if (confirm('Quieres entrar a NorfiPC?'))
{parent.location='http://norfipc.com/index.html';};">Vnculo</a>
<script type="text/javascript">
document.oncontextmenu = function(){return false}
</script>
Varios
self.status=DateString.substring(0,3+DateString.lastIndexOf(':'))
"Cualquier mensaje";
setTimeout("hora()",200);}
hora()
</script>
Ms informacin: Como mostrar la fecha y hora en las pginas web usando
Javascript
{window.sidebar.addPanel(''+window.document.title,''+window.docume
nt.URL,'')} else{parent.location=(location.href);}">Guardar</a>
Se mostrar de la siguiente forma:
Agrega esta pgina en tus favoritas en el siguiente link:
Guardar
Texto parpadeante
Hola!
Si deseas insertarle un vnculo al texto parpadeante utiliza el segundo DIV,
(solo puede existir en el cdigo in ID nico).
<script type="text/javascript">
window.setInterval (BlinkIt, 500);
var color = "red";
function BlinkIt () {
var blink = document.getElementById ("blink");
color = (color == "#ffffff")? "red" : "#ffffff";
blink.style.color = color;
blink.style.fontSize='36px';}
</script>
<div id="blink">Hola!</div>
<div id="blink" onclick="parent.location='http://norfipc.com'">
Hola!</div>
Con este cdigo vamos a impedir que los visitantes seleccionen el texto de nuestra
pgina para luego copiarlo a otro lado.
<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>
Recomendar Pagina:
Con este cdigo podemos hacer que si a un visitante le gust nuestra Web, la
recomiende a un amigo escribiendo su direccin de correo electrnico en la casilla, al
hacer click en "Recomendar esta Web" se enva un mensaje de correo con el asunto
"Pienso que te puede interesar esta pgina..." y en el cuerpo del mensaje aparece la
direccin completa donde se encuentra el cdigo y el ttulo de la misma.
<form name="eMailer">
ENVA ESTA PGINA 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 pgina...";
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>
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>
<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, tambin hay un contratruco, si entrs a una pgina que
tiene este truco que no te deja copiar imgenes o texto, solo tens que hacer click con
el botn derecho del mouse sobre la barra de estado y sin soltarlo arrastrarlo hasta la
imgen. Listo, se abrir el men como si la pgina no estuviese bloqueada a la copia.
Hay que tener en cuenta que muy poca gente conoce este truco, por lo tanto pods
usar tranquilo el truco de bloqueo.
Con este truco pods hacer que al hacer clic sobre una palabra, se abra el Outlook para
enviar un mensaje con tu direccin, el asunto que quieras y el texto que quieras. Por
ejemplo:
<a href="mailto:[email protected]?subject=Prueba.&body=Estoy
probando el truco...">Hac clic ac para mandarme un mensaje</a>
Crear un PopUp:
Abrir una pequea ventana con una imagen. Podemos darle las medidas que queramos
cambiando "Width" y "Height".
<a name="1"></a><A
onclick="window.open('MiFoto.jpg','Estructuras','toolbar=no,location=no,scr
ollbars=yes,directories=
no,status=no,menubar=no,resizable=no,width=400,height=475');"
href="#1"><b><font face="Verdana" size="2">Ejemplo</font></b></a>
Con este truco, podemos hacer que aparezca en la barra de estado la hora de la PC
que entra a nuestra Web y poner el texto que queramos.
<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>
Botn animado:
Aprend a dar movimiento a tu pgina con botones animados por Java Script. Cada
botn puede llevar a un enlace distinto. Slo tienes que configurar los parmetros
"lineArr" y "urlArr" del script, que permiten destacar cosas en tu pgina.
<font face="Arial, Helvetica, sans-serif" size="2">
< script language="JavaScript">
var timerID = null
var timerRunning = false
var charNo = 0
var charMax = 0
var lineNo = 0
var lineMax = 3
var lineArr = new Array(lineMax)
var urlArr = new Array(lineMax)
lineArr[1] = "Pauluk Computacin"
urlArr[1] = "http://www.CheNico.com"
lineArr[2] = "Trucos PC"
urlArr[2] = "http://www.pauluk.8k.com/trucosprin.htm"
lineArr[3] = "Noticias Tecnolgicas y Actualidad"
urlArr[3] = "http://www.pauluk.8k.com/noticias.htm"
var lineText = lineArr[1]
function StartShow() {
StopShow()
ShowLine()
timerRunning = true
}
function FillSpaces() {
for (var i = 1; i <= lineWidth; i++) {
spaces += " "
}
}
function StopShow() {
if (timerRunning) {
clearTimeout(timerID)
timerRunning = false
}
}
function ShowLine() {
if (charNo == 0) {
if (lineNo < lineMax) {
lineNo++
}
else {
lineNo = 1
}
lineText = lineArr[lineNo]
charMax = lineText.length
}
if (charNo <= charMax) {
document.formDisplay.buttonFace.value = lineText.substring(0, charNo)
charNo++
timerID = setTimeout("ShowLine()", 100)
}
else {
charNo = 0
timerID = setTimeout("ShowLine()", 3000)
}
}
function GotoUrl(url)
{
top.location.href = url
}
document.write("<form name=\"formDisplay\">");
document.write("<input type=\"button\" name=\"buttonFace\"
value=\"&{lineText}\" size=\"18\"
onClick=\"GotoUrl(urlArr[lineNo])\">");
document.write("</form>");
StartShow();
< /script></font>
Letrero de mensajes:
Este es un efecto muy fcil de lograr y muy funcional para tu pgina. Pods definir
cuntos textos y enlaces quieras. Ellos se destacarn y tu pgina quedar mucho ms
dinmica. Pods ver cmo personalizar este recurso al final de esta pgina. Es mejor
que Java ya que es mucho ms liviano y rpido de cargarse, y no necesita archivos
adicionales.
Para incluir este recurso en tu pgina debes seguir dos pasos:
Paso 1: Incluye el siguiente cdigo en tu etiqueta "<BODY>", agrega un espacio
despus del ltimo parmetro 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'>Descripcin del enlace1
aqu</a></center>"
textos[1]="<center><a href='Enlace2 Aqu'>Descripcin del enlace2
aqu</a></center>"
textos[2]="<center><a href='Enlace3 Aqu'>Descripcin 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)
}
function BgFade(red1, grn1, blu1, red2,
grn2, blu2, steps) {
sred = red1; sgrn = grn1; sblu = blu1;
ered = red2; egrn = grn2; eblu = blu2;
inc = steps;
step = 0;
RunFader();
}
function RunFader() {
var epct = step/inc;
var spct = 1 - epct;
if (document.layers)
tickerobject.bgColor =
Math.floor(sred * spct + ered *
epct)*256*256 +
Math.floor(sgrn * spct + egrn * epct)*256 +
Math.floor(sblu * spct + eblu * epct);
else
tickerobject.backgroundColor=
Math.floor(sred * spct + ered *
epct)*256*256 +
Math.floor(sgrn * spct + egrn * epct)*256 +
Math.floor(sblu * spct + eblu * epct);
if ( step < inc ) {
setTimeout('RunFader()',50);
}
step++;
}
< /script>
alert("www.CheNico.com");
return false;
}
else if (navigator.appName == 'Microsoft Internet Explorer' &&
(event.button == 2 || event.button == 3)) {
alert("www.CheNico.com");
return false;
}
return true;
}
document.onmousedown=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=right;
< /script>
< /body>
< /html>
Registrate y obten Publicidad para tu Web
Botn Colorido:
Cansado del botn siempre gris? Ahora con CSS pods definir cualquier color para tus
botones. Ellos combinarn ms con tu pgina y son muy fciles de crear.
Hac que un texto cualquiera siga al mouse del visitante en tu pgina. Es un efecto
fabuloso y fcil de incluir en las pginas
Incluye el siguiente cdigo en tu pgina HTML:
<style>
.animado {position:absolute;visibility:visible;top:-50px;font-size:10pt;fontfamily: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
}
var ypos=new Array()
for (i=0;i<=texto.length-1;i++) {
ypos[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
for (i=0; i<texto.length-1; i++) {
var camada = eval("span"+(i)+".style")
camada.posLeft=xpos[i]
camada.posTop=ypos[i]
}
}
else if (espera==1 && document.layers) {
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
for (i=0; i<texto.length-1; i++) {
var camada = eval("document.span"+i)
camada.left=xpos[i]
camada.top=ypos[i]
}
}
var timer=setTimeout("animar_cursor()",30)
}
< /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;zindex: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.innerWidth40+window.pageXOffset)movimento=Math.round(Math.random()*45+157.5)
;
if (document.animacao.top >= window.innerHeight30+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.offsetWidth45+document.body.scrollLeft)movimento=Math.round(Math.random()*45+1
57.5);
if (document.all.animacao.style.pixelTop >= document.body.offsetHeight35+document.body.scrollTop)movimento=Math.round(Math.random()*45112.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 expansin:
Coloc en tu pgina mensajes animados que se agrandan y llaman la atencin de los
visitantes. Adems, incluyen enlaces hacia donde vos quieras.
Copi el siguiente cdigo y pegalo en tus pginas debajo de la etiqueta <Body>.
<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",
"[email protected]"
);
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=textdecoration: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=textdecoration: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=textdecoration: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=textdecoration:none;color:#000099>"+mensagens+"</a></center></font>";
wds.style.fontSize=x+'px'
}
}
setTimeout("aumenta()",velocidade);
< /script>
<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">
& nbsp;</p>
< /center>
< /form>
<script language="JavaScript1.2">
< !-function scrollBar(line,face,theme)
{
if (!line||!face)
{
line=null;
face=null;
switch(theme)
{
case "blue":
var line="black";
var face="#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>"#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>
scrollbar-arrow-color : #FFFFFF; }
.nav {
color : #FFCC00;
font-size : 8pt;}
-->
< /style>
Paso 1: Para que el recurso se inicie junto con la pgina, debes incluir dentro de la
etiqueta <body> el parmetro de inicio. Agreg un espacio despus del ltimo
parmetro e incluye:
Onload="show5()"
<body Onload="show5()">
if (!document.layers&&!document.all)
return
var Digital=new Date()
var hours=Digital.getHours()
var minutes=Digital.getMinutes()
var seconds=Digital.getSeconds()
var dn="AM"
if (hours>12){
dn="PM"
hours=hours-12
}
if (hours==0)
hours=12
if (minutes<=9)
minutes="0"+minutes
if (seconds<=9)
seconds="0"+seconds
meurelogio="<font size='5' face='Arial'><b>"+hours+":"+minutes+":"
+seconds+" "+dn+"</b></font>"
if (document.layers){
document.layers.relogio.document.write(meurelogio)
document.layers.relogio.document.close()
}
else if (document.all)
relogio.innerHTML=meurelogio
setTimeout("show5()",1000)
}
//-->
< /script>
< /font>
<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 = " Mircoles, "
else if(myday == 4)
day = " Jueves, "
else if(myday == 5)
day = " Viernes, "
else if(myday == 6)
day = " Sbado, "
if(mymonth == 0)
month = "Enero "
else if(mymonth ==1)
month = "Febrero "
else if(mymonth ==2)
month = "Marzo "
else if(mymonth ==3)
month = "Abril "
else if(mymonth ==4)
month = "Mayo "
else if(mymonth ==5)
month = "Junio "
else if(mymonth ==6)
month = "Julio "
else if(mymonth ==7)
month = "Agosto "
else if(mymonth ==8)
month = "Setiembre "
Mensaje de bienvenida:
Con este recurso personalizs tu sitio para el visitante. Al entrar, el visitante ver un
espacio para ingresar su nombre y un mensaje que dice "Hola, Fulano".
Copi el siguiente cdigo y pgalo donde quieras que aparezca el mensaje:
<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>
Atrs y Adelante:
Atrs:
<a href="javascript:history.go(-1)">Atrs </a>
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 caractersticas especiales de tu sitio. Cada mensaje tendr un
enlace
Paso 1: Copi el siguiente cdigo y pegalo en tu pgina:
<script language="JavaScript1.2">
var largura=150
var altura=120
var bgcolor='white'
var fundo=''
var mensagens=new Array()
mensagens[0]="<center><font face='Arial' size=2><a href='Coloca
direccin de la pgina 1 aqu'>Coloca el texto del enlace 1
aqu</a></font></center>"
mensagens[1]="<center><font face='Arial' size=2><a href='Coloca
direccin de la pgina 2 aqu'>Coloca el texto del enlace 2
aqu</a></font></center>"
mensagens[2]="<center><font face='Arial' size=2><a href='Coloca
direccin de la pgina 3 aqu'>Coloca el texto del enlace 3
aqu</a></font></center>"
mensagens[3]="<center><font face='Arial' size=2><a href='Coloca
direccin de la pgina 4 aqu'>Coloca el texto del enlace 4
la
la
la
la
aqu</a></font></center>"
mensagens[4]="<center><font face='Arial' size=2><a href='Coloca la
direccin de la pgina 5 aqu'>Coloca el texto del enlace 5
aqu</a></font></center>"
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;b
ackground-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>>
var
var
var
var
largura=150
altura=120
bgcolor='white'
fundo=''
Donde dice "white" pods ingresar el valor hexadecimal del nuevo color; por ejemplo:
#FFCC00
En "fondo" pods colocar el nombre de la imagen de fondo del letrero; por ejemplo:
var
var
var
var
largura=150
altura=120
bgcolor='white'
fundo='Nombre del archivo de imagen'
<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 segn la hora en que el visitante
entre. Este puede recibir el saludo "Buen da", "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 pgina.
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 pgina. Es
ideal para destacar tu logo o lo que vos prefieras.
Texto de apertura:
Este es un recurso muy interesante. Pods lograr que, al entrar a tu pgina, el usuario
vea un mensaje de bienvenida o cualquier otro que configures. Luego, el usuario es
llevado automticamente a la pgina que t definas.
Para tener este recurso en tu pgina, slo debes copiar el siguiente cdigo, pegarlo en
tu editor y guardar la pgina como principal. De esta forma, al entrar a tu pgina, los
visitantes vern los mensajes y luego sern llevados a la pgina que t definas. Es
muy fcil configurar este recurso. Basta con alterar las reas destacadas en negrito en
el cdigo. Si tienes problemas con algn editor HTML que no reconozca el cdigo, copia
y pega este cdigo en el bloc de notas del Windows u otro editor de texto y no olvides
guardarlo con extensin html.
< HTML>
< HEAD>
< TITLE>Ingresa el ttulo 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 makeSlideShow (obj, wait, pre, url) {
this.curText = '';
this.posit = 1;
this.word = obj;
this.length = obj.length;
this.pre = pre;
this.wait = wait;
this.url = url;
this.display = displaySlideShow;
}
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 pgina 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>
Con este recurso pods incluir varios mensajes, novedades y noticias sobre tu sitio. Es
una forma de destacar lo que quieras y tambin de agregar un efecto diferente a tu
sitio.
=
=
=
=
=
"Ingresa
"Ingresa
"Ingresa
"Ingresa
"Ingresa
aqu
aqu
aqu
aqu
aqu
el
el
el
el
el
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 = ""
<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,
gans espacio y facilidad de navegacin. Este men no necesita un botn para
activarse. Basta con seleccionar el enlace y automticamente el navegador se dirigir a
la pgina. Este men funciona en pginas sin marcos.
<form>
< select NAME="links"
onChange="top.location.href=this.form.links.options[this.form.links.selected
Index].value">
< option SELECTED>Elija la seccin que desee</option>
< option VALUE="http://www.pauluk.8k.com">Pauluk
Computacin</option>
< option VALUE="http://www.pauluk.8k.com/trucos.htm">Trucos
PC</option>
Instrucciones para personalizacin: Observ que cada opcin del men se hace
con la etiqueta:
Pods incluir en tu pgina un sonido de fondo. De esta forma, siempre que alguien
acceda a tu pgina, escuchar dicho sonido. As pods darle ms personalidad a tu
sitio. Los archivos de sonido ideales para una homepage son aquellos en formato MIDI
(.MID), pero tambin pods incluir sonidos del tipo WAVE (.WAV).
La etiqueta para incluir sonido en tu pgina debe ser <EMBED>. Observ el ejemplo:
Actualizar:
La pgina "Actualizar" lleva al usuario a otra pgina sin que el mismo deba ejecutar
accin 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>
Cdigos HTML
< /BODY>
< /HTML>