Foros del Web » Programando para Internet » Javascript »

algo facilito (espero)

Estas en el tema de algo facilito (espero) en el foro de Javascript en Foros del Web. bueno ahi va mi duda tengo echa una tabla echa kon uns links dentro i kiero k kuando pase el raton por encima del link ...
  #1 (permalink)  
Antiguo 19/05/2002, 05:48
 
Fecha de Ingreso: abril-2002
Mensajes: 39
Antigüedad: 22 años
Puntos: 0
algo facilito (espero)

bueno ahi va mi duda tengo echa una tabla echa kon uns links dentro i kiero k kuando pase el raton por encima del link k el color de fondo de la celda de la tabla kambie de kolor a ver si me podeis ayudar asias ;)
  #2 (permalink)  
Antiguo 19/05/2002, 07:22
 
Fecha de Ingreso: diciembre-2001
Ubicación: Madrid
Mensajes: 889
Antigüedad: 22 años, 4 meses
Puntos: 4
Re: algo facilito (espero)

Pues es tan facilito como mirar el código fuente de fdw :-p

<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
function sobre(src,Color) {
if (!src.contains(event.fromElement)) {
src.style.cursor = ''hand'';
src.bgColor = Color;}}
function fuera(src,Color2) {
if (!src.contains(event.toElement)) {
src.style.cursor = ''default'';
src.bgColor = Color2;}}
</SCRIPT>
</HEAD>
<BODY BGCOLOR="#E4E4E4">
<TABLE BORDER="0" CELLSPACING="1" CELLPADDING="0"><TR>
<TD onMouseOut="fuera(this,''#E4E4E4'');" onMouseOver="sobre(this,''#006666'');"&g t;Uno</TD></TR><TR>
<TD onMouseOver="sobre(this,''#006666'');" onMouseOut="fuera(this,''#E4E4E4'');"&gt ;Otro</TD></TR><TR>
<TD onMouseOut="fuera(this,''#E4E4E4'');" onMouseOver="sobre(this,''#006666'');"&g t;Y otro</TD></TR></TABLE>
</BODY>
</HTML>

Saludos!
  #3 (permalink)  
Antiguo 19/05/2002, 09:18
 
Fecha de Ingreso: abril-2002
Mensajes: 39
Antigüedad: 22 años
Puntos: 0
Re: algo facilito (espero)

mmm este no me a servido de mucho si teneis otro os lo agradeceria
  #4 (permalink)  
Antiguo 19/05/2002, 09:51
 
Fecha de Ingreso: enero-2002
Mensajes: 535
Antigüedad: 22 años, 3 meses
Puntos: 1
Re: algo facilito (espero)

Hola!
Entre el <head> y </head> pones esto:

<SCRIPT>
function mOvr(src,clrOver) {
if (!src.contains(event.fromElement)) {
src.style.cursor = 'hand';
src.bgColor = clrOver;
}
}
function mOut(src,clrIn) {
if (!src.contains(event.toElement)) {
src.style.cursor = 'default';
src.bgColor = clrIn;
}
}
function mClk(src) {
if(event.srcElement.tagName=='TD')
src.children.tags('A')[0].click();
}</script>
Y dentro del <td> de la tabla pones esto

onMouseOver='mOvr(this,"blue ");'
onMouseOut='mOut(this,"black ");'

Por ejemplo , primero pones lo que te dije en el head y en la tabla haces asi
<table align="center">
<tr>
<td onMouseOver='mOvr(this,"blue");'
onMouseOut='mOut(this,"black");'>Hola </td>
</tr>
</table>
  #5 (permalink)  
Antiguo 19/05/2002, 13:07
 
Fecha de Ingreso: abril-2002
Mensajes: 39
Antigüedad: 22 años
Puntos: 0
Re: algo facilito (espero)

ese si k me vale asias koptrox
  #6 (permalink)  
Antiguo 19/05/2002, 13:14
Avatar de lado2mx
Colaborador
 
Fecha de Ingreso: agosto-2001
Ubicación: Veracruz
Mensajes: 3.720
Antigüedad: 22 años, 8 meses
Puntos: 9
Re: algo facilito (espero)

<td onMouseOver="bgColor='#FFFFFF';" onMouseOut="bgColor='#000000';">font face="Arial, Helvetica, sans-serif" size="3" color="#FFFFFF"><b>ALGO</b></font></td>

Creo que este es mas simple, y mejor, como vez?

<html><center><iframe marginwidth="0" marginheight="0" scrolling="no" frameborder="0" src="http://www.ladodos.com/firma/firma.php" width=500 height=100></iframe></center></html>
  #7 (permalink)  
Antiguo 19/05/2002, 14:45
 
Fecha de Ingreso: abril-2002
Mensajes: 39
Antigüedad: 22 años
Puntos: 0
Re: algo facilito (espero)

gracias a todos por kontestarme ya lo e konseguido
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 15:50.