metalword

codigos

Historial del Visitante

Acá les dejo este código que sirve para que el Visitante pueda ver las veces que ha pasado por nuestra Web.

Se pregunta solo una vez, después se le da la Bienvenida con el texto en la parte superior derecha.

El código va pegado tal cual en el box 1, puedes modificar el texto marcado con rojo.

 
Código

<html><b>
<head><script LANGUAGE="JavaScript">
<!--BEGIN Script
var expDays = 30;
var exp = new Date();
exp.setTime(exp.getTime() + (expDays*24*60*60*1000));
function Who(info){
var VisitorName = GetCookie('VisitorName')
if (VisitorName == null) {
VisitorName = prompt("Hola! Tu Nombre?");
SetCookie ('VisitorName', VisitorName, exp);
}
return VisitorName;
}
function When(info){
var rightNow = new Date()
var WWHTime = 0;
WWHTime = GetCookie('WWhenH')
WWHTime = WWHTime * 1
var lastHereFormatting = new Date(WWHTime);
var intLastVisit = (lastHereFormatting.getYear() * 10000)+(lastHereFormatting.getMonth() * 100) + lastHereFormatting.getDate()
var lastHereInDateFormat = "" + lastHereFormatting;
var dayOfWeek = lastHereInDateFormat.substring(0,3)
var dateMonth = lastHereInDateFormat.substring(4,11)
var timeOfDay = lastHereInDateFormat.substring(11,16)
var year = lastHereInDateFormat.substring(23,25)
var WWHText = dayOfWeek + ", " + dateMonth + " at " + timeOfDay
SetCookie ("WWhenH", rightNow.getTime(), exp)
return WWHText
}
function Count(info){
var WWHCount = GetCookie('WWHCount')
if (WWHCount == null) {
WWHCount = 0;
}
else{
WWHCount++;
}
SetCookie ('WWHCount', WWHCount, exp);
return WWHCount;
}
function set(){
VisitorName = prompt("Hola! Tu Nombre?");
SetCookie ('VisitorName', VisitorName, exp);
SetCookie ('WWHCount', 0, exp);
SetCookie ('WWhenH', 0, exp);
document.location="http://www.terra.es/personal8/webtrucos";
}
function getCookieVal (offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}
function GetCookie (name) {
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen) {
var j = i + alen;
if (document.cookie.substring(i, j) == arg)
return getCookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return null;
}
function SetCookie (name, value) {
var argv = SetCookie.arguments;
var argc = SetCookie.arguments.length;
var expires = (argc > 2) ? argv[2] : null;
var path = (argc > 3) ? argv[3] : null;
var domain = (argc > 4) ? argv[4] : null;
var secure = (argc > 5) ? argv[5] : false;
document.cookie = name + "=" + escape (value) +
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
((path == null) ? "" : ("; path=" + path)) +
((domain == null) ? "" : ("; domain=" + domain)) +
((secure == true) ? "; secure" : "");
}
function DeleteCookie (name) {
var exp = new Date();
exp.setTime (exp.getTime() - 1);
var cval = GetCookie (name);
document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}
// End -->
</script>

<title>JavaFILE</title>
<base target="leftframe">
</head>

<body <font color="#00FF00"> <!--content start-->


<table WIDTH="80%" BORDER="0" CELLSPACING="5" CELLPADDING="5">
<tr>

<p align="center"><script LANGUAGE="JavaScript">
document.write(" Hola " + Who() + ". tú has estado en esta página " + Count() + " veces. la última vez que nos visitaste fue el " + When() +".");
</script>
</p>

</tr>
</table>
<!--content stop-->
</body></b>
</html>



 
 

 

Saludo de Bienvenida

 
Acá te dejo este código, solo debes modificar la parte marcada en rojo, en la página donde lo pegues haslo bajo "Fuente Html"

 
Código

<html>

<head>
<title>Alert Box2</title>
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<script language="JavaScript">
function CONFIRM(){if (!confirm
(" Quieres uno de estos en tu web???"))
history.go(-1);return " "}
document.writeln(CONFIRM())
</script>
</head>

<body>

</body>
</html>





 
 

 

Cambiar la forma del Puntero

Con este código cambiamos la imágen típica del puntero flecha, por una mira de disparo, pega este código en algún box de editar diseño

 
Código

<style type="text/css">
<!--
body { cursor: crosshair}
-->
</style>


 
 

 

La Fecha en tu Web

 
 
Este código nos indica la fecha del día,  no modifiques nada, solo pégalo en algún box, yo lo hice en box1

 
Código

<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 "

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 "

else if(mymonth ==9)
month = "Octubre "

else if(mymonth ==10)
month = "Noviembre "

else if(mymonth ==11)
month = "Diciembre "

document.write("<font face=arial, size=1>"+ day);
document.write(myweekday+" de "+month+ "</font>");
// -->
</script>




 
Cuadro de texto



 

 
Código Centrado


<div align="center"><textarea rows="4" cols="13">En esta parte.....</textarea></div>









 
Código Normal


<textarea rows="4" cols="13">En esta parte ......</textarea>

Hoy habia 3 visitantes (9 clics a subpáginas) ¡Aqui en esta página!