09. oktober 2003 - 17:59
Der er
7 kommentarer og 1 løsning
En "hover" effekt
Når man markere punkterne med et "." foran skal den hove til 294563.. ex på tekst ". Links" skal hove til 294563. Alle uden "." foran skal altså IKKE hove.. Koden: <tr> <td width="100%"><font color="#FFFFFF" face="Verdana" size="2"><b>Information</b></font></td> </tr> <tr> <td width="100%" ><font color="#FFFFFF" face="Verdana" size="2">. About us</font></td> </tr> <tr> <td width="100%"><font color="#FFFFFF" face="Verdana" size="2">. The Crew</font></td> </tr> <tr> <td width="100%"><font color="#FFFFFF" face="Verdana" size="2">. Contact</font></td> </tr> <tr> <td width="100%"><font color="#FFFFFF" face="Verdana" size="2"><b>Downloads</b></font></td> </tr> <tr> <td width="100%"><font color="#FFFFFF" face="Verdana" size="2">. Maps</font></td> </tr> <tr> <td width="100%"><font color="#FFFFFF" face="Verdana" size="2">. Server stuff</font></td> </tr> <tr> <td width="100%"><font color="#FFFFFF" face="Verdana" size="2">. Pod Bot</font></td> </tr> <tr> <td width="100%"><font color="#FFFFFF" face="Verdana" size="2">. Misc</font></td> </tr> <tr> <td width="100%"><font face="Verdana" size="2" color="#FFFFFF"><b>Misc.</b></font></td> </tr> <tr> <td width="100%"><font face="Verdana" size="2" color="#FFFFFF">. Links </font></td> </tr> <tr> <td width="100%"><font face="Verdana" size="2" color="#FFFFFF">. Forum</font></td> </tr> <tr> <td width="100%"><font face="Verdana" size="2" color="#FFFFFF">. Condition Zero</font></td> </tr>
Annonceindlæg tema
Offentlig digitalisering
Fra effektivisering til digital suverænitet. Hvordan skaber det offentlige en digital fremtid med AI, sikkerhed og kontrol i centrum?
09. oktober 2003 - 17:59
#1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Untitled</title> <script language="JavaScript"> function colorThis(what, color) { document.getElementById(what).style.backgroundColor= color; } </script> </head> <body bgcolor="#000000"> <table> <tr> <td width="100%"><font color="#FFFFFF" face="Verdana" size="2"><b>Information</b></font></td> </tr> <tr> <td width="100%" id="1" onmouseover="colorThis(this.id, '#294563');" onmouseout="colorThis(this.id, '#000000');"><font color="#FFFFFF" face="Verdana" size="2">. About us</font></td> </tr> <tr> <td width="100%"><font color="#FFFFFF" face="Verdana" size="2">. The Crew</font></td> </tr> <tr> <td width="100%"><font color="#FFFFFF" face="Verdana" size="2">. Contact</font></td> </tr> <tr> <td width="100%"><font color="#FFFFFF" face="Verdana" size="2"><b>Downloads</b></font></td> </tr> <tr> <td width="100%"><font color="#FFFFFF" face="Verdana" size="2">. Maps</font></td> </tr> <tr> <td width="100%"><font color="#FFFFFF" face="Verdana" size="2">. Server stuff</font></td> </tr> <tr> <td width="100%"><font color="#FFFFFF" face="Verdana" size="2">. Pod Bot</font></td> </tr> <tr> <td width="100%"><font color="#FFFFFF" face="Verdana" size="2">. Misc</font></td> </tr> <tr> <td width="100%"><font face="Verdana" size="2" color="#FFFFFF"><b>Misc.</b></font></td> </tr> <tr> <td width="100%"><font face="Verdana" size="2" color="#FFFFFF">. Links </font></td> </tr> <tr> <td width="100%"><font face="Verdana" size="2" color="#FFFFFF">. Forum</font></td> </tr> <tr> <td width="100%"><font face="Verdana" size="2" color="#FFFFFF">. Condition Zero</font></td> </tr> </table> </body> </html> //>Rune
09. oktober 2003 - 18:00
#2
Det her er lidt bedere: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Untitled</title> <script language="JavaScript"> function colorThis(what, color) { what.style.backgroundColor= color; } </script> </head> <body bgcolor="#000000"> <table> <tr> <td width="100%"><font color="#FFFFFF" face="Verdana" size="2"><b>Information</b></font></td> </tr> <tr> <td width="100%" onmouseover="colorThis(this, '#294563');" onmouseout="colorThis(this, '#000000');"><font color="#FFFFFF" face="Verdana" size="2">. About us</font></td> </tr> <tr> <td width="100%"><font color="#FFFFFF" face="Verdana" size="2">. The Crew</font></td> </tr> <tr> <td width="100%"><font color="#FFFFFF" face="Verdana" size="2">. Contact</font></td> </tr> <tr> <td width="100%"><font color="#FFFFFF" face="Verdana" size="2"><b>Downloads</b></font></td> </tr> <tr> <td width="100%"><font color="#FFFFFF" face="Verdana" size="2">. Maps</font></td> </tr> <tr> <td width="100%"><font color="#FFFFFF" face="Verdana" size="2">. Server stuff</font></td> </tr> <tr> <td width="100%"><font color="#FFFFFF" face="Verdana" size="2">. Pod Bot</font></td> </tr> <tr> <td width="100%"><font color="#FFFFFF" face="Verdana" size="2">. Misc</font></td> </tr> <tr> <td width="100%"><font face="Verdana" size="2" color="#FFFFFF"><b>Misc.</b></font></td> </tr> <tr> <td width="100%"><font face="Verdana" size="2" color="#FFFFFF">. Links </font></td> </tr> <tr> <td width="100%"><font face="Verdana" size="2" color="#FFFFFF">. Forum</font></td> </tr> <tr> <td width="100%"><font face="Verdana" size="2" color="#FFFFFF">. Condition Zero</font></td> </tr> </table> </body> </html> //>Rune
09. oktober 2003 - 18:01
#3
Altså alt i alt: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Untitled</title> <script language="JavaScript"> function colorThis(what, color) { what.style.backgroundColor= color; } </script> </head> <body bgcolor="#000000"> <table> <tr> <td width="100%"><font color="#FFFFFF" face="Verdana" size="2"><b>Information</b></font></td> </tr> <tr> <td width="100%" onmouseover="colorThis(this, '#294563');" onmouseout="colorThis(this, '#000000');"><font color="#FFFFFF" face="Verdana" size="2">. About us</font></td> </tr> <tr> <td width="100%" onmouseover="colorThis(this, '#294563');" onmouseout="colorThis(this, '#000000');"><font color="#FFFFFF" face="Verdana" size="2">. The Crew</font></td> </tr> <tr> <td width="100%" onmouseover="colorThis(this, '#294563');" onmouseout="colorThis(this, '#000000');"><font color="#FFFFFF" face="Verdana" size="2">. Contact</font></td> </tr> <tr> <td width="100%"><font color="#FFFFFF" face="Verdana" size="2"><b>Downloads</b></font></td> </tr> <tr> <td width="100%" onmouseover="colorThis(this, '#294563');" onmouseout="colorThis(this, '#000000');"><font color="#FFFFFF" face="Verdana" size="2">. Maps</font></td> </tr> <tr> <td width="100%" onmouseover="colorThis(this, '#294563');" onmouseout="colorThis(this, '#000000');"><font color="#FFFFFF" face="Verdana" size="2">. Server stuff</font></td> </tr> <tr> <td width="100%" onmouseover="colorThis(this, '#294563');" onmouseout="colorThis(this, '#000000');"><font color="#FFFFFF" face="Verdana" size="2">. Pod Bot</font></td> </tr> <tr> <td width="100%" onmouseover="colorThis(this, '#294563');" onmouseout="colorThis(this, '#000000');"><font color="#FFFFFF" face="Verdana" size="2">. Misc</font></td> </tr> <tr> <td width="100%"><font face="Verdana" size="2" color="#FFFFFF"><b>Misc.</b></font></td> </tr> <tr> <td width="100%" onmouseover="colorThis(this, '#294563');" onmouseout="colorThis(this, '#000000');"><font face="Verdana" size="2" color="#FFFFFF">. Links </font></td> </tr> <tr> <td width="100%" onmouseover="colorThis(this, '#294563');" onmouseout="colorThis(this, '#000000');"><font face="Verdana" size="2" color="#FFFFFF">. Forum</font></td> </tr> <tr> <td width="100%" onmouseover="colorThis(this, '#294563');" onmouseout="colorThis(this, '#000000');"><font face="Verdana" size="2" color="#FFFFFF">. Condition Zero</font></td> </tr> </table> </body> </html> //>Rune
11. oktober 2003 - 05:46
#4
<ole> Og en smule mere 'sexy': <script language="JavaScript"> var hi="#ffffff", lo="#000000"; function colorThis(elm, inout) { document.getElementById(elm).style.backgroundColor = (inout)? hi : lo; } </script> ... og en tabelcelle: <td width="100%" onmouseover="colorThis(this, 1);" onmouseout="colorThis(this, 0);"> Så skal farverne kun rettes ét sted (hvis altså de to farver altid er de samme over hele siden). /mvh </bole>
11. oktober 2003 - 15:41
#5
??? Ole, hvad gør hi : lo ? //>Rune
11. oktober 2003 - 19:40
#6
Det er de to farver ( hvor hi = hover-farven ): var hi="#ffffff", lo="#000000"; /mvh
11. oktober 2003 - 19:42
#7
... og så bruger jeg en short-hand for en if/else: if ( betingelse ) { bla = "noget"; } else { bla = "noget andet"; } kan skrives: bla = ( betingelse )? "noget" : "noget andet";
11. oktober 2003 - 20:05
#8
Ok :) Ole, skriver du ik' lgie en mail til mig på rune@medions.dk //>Rune
Vi tilbyder markedets bedste kurser inden for webudvikling