Inicio Ayuda Buscar Shop Ingresar Registrarse
 
Bienvenido(a), Visitante. Favor de ingresar o registrarse.

Ingresar con nombre de usuario, contraseña y duración de la sesión
 
Noticias: Consigue tu dominio .com .net gratis
 
Páginas: [1]   Ir Abajo
  Imprimir  
Autor Tema: Efecto de rayos al pasar el ratón por encima de un link y nombre a un visitante  (Leído 115 veces)
0 Usuarios y 1 Visitante están viendo este tema.
j.garcia2
Global Moderator
Hero Member
*****

Karma: -1
Desconectado Desconectado

Sexo: Masculino
Mensajes: 678
$308.00 creditos

Ver Inventario
Enviar Dinero a j.garcia2


Ver Perfil WWW Email
« en: Septiembre 09, 2008, 01:21:37 »

Bueno aquí os dejo un código para mostrar un efecto de rayos al pasar el ratón por encima de un link y otro para pedir el nombre a un usuario que entre a nuestra página, espero que os sirvan, saludos.
Código:
<style type="text/css">
 a.navbar:hover{color:red;
font-weight:bold;background-image:url(http://usuarios.lycos.es/jarencito/hi5/efectos/rayo-efec.gif);} a:hover, a.redlink:hover, a.navbar:hover
{background-image:url(http://usuarios.lycos.es/jarencito/hi5/efectos/rayo-efec.gif); text-decoration:none; border:0px solid;} a:hover img
{background-image:url(http://usuarios.lycos.es/jarencito/hi5/efectos/rayo-efec.gif);filter:alpha(finishopacity=0, style=2); }
</style>

Código:
<html>

<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("como te llamas?");
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("como te llamas");
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 BGCOLOR="#ffffff" link="#CC0033" vlink="#333399" alink="#FF0000" <!--content start-->


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

<p align="center"><script LANGUAGE="Javascript">
document.write("Hola " + Who() + ". usted ha estado en esta pagina " + Count() + " veces. la zltima vez que nos visits fue " + When() +".");
</script>
</p>

</tr>
</table>
<!--content stop-->
</body>
</html>
En línea

NUEVA CULTURA MUSICAL:

Debes estar registrado para poder ver los links.
Registrate o Login

Debes estar registrado para poder ver los links.
Registrate o Login
EQUIPO REVELACION FUTBOL SALA:

Debes estar registrado para poder ver los links.
Registrate o Login
oldfox
Full Member
***

Karma: 0
Desconectado Desconectado

Mensajes: 148
$39.00 creditos

Ver Inventario
Enviar Dinero a oldfox


Ver Perfil WWW
« Respuesta #1 en: Abril 09, 2009, 10:29:53 »

Vale por el codigo, tendras alguna captura, para ver como queda

Gracias
En línea

El tiempo pasa, los errores pesan en tu espalda
Páginas: [1]   Ir Arriba
  Imprimir  
 
Ir a:  

Página creada en 0.127 segundos con 17 queries.