20. januar 2004 - 14:05
Der er
8 kommentarer og 1 løsning
Vis Indhold
Hej, Kan nogen hjælpe mig med at få den her script til at fungere ? Problemet er at den ikke vil skjule indholdet! Det er meningen at den skal skjule indholdet og når man klikker på linket vis indhold skal den vise indholdet. <html> <head> <title>Indhold</title> <script language="JavaScript"> //-- function expandIt(whichEl){ whichEl.style.display = (whichEl.style.display == "none" ) ? "" : "none"; } //-- </script> </head> <body> <table border="0" width="250" cellspacing="0" cellpadding="0" id="table1"> <tr> <td align="center"><a href="java script:expandIt(Elindhold)">Vis indhold</a></td> </tr> <span id="Elindhold" style="display: none;"> <tr> <td> <table border="0" width="250" cellspacing="0" cellpadding="0" id="table2"> <tr> <td width="250">Her skal den vise/skjule indhold</td> </tr> </table> </td> </tr> </span> </table> </body> </html>
Annonceindlæg fra Barco
20. januar 2004 - 14:10
#1
function expandIt(whichEl){ El=document.getElementById('whichEl'); El.style.display=(El.style.display=="none")?"inline":"none"; } <a href="java script:expandIt('Elindhold')">
20. januar 2004 - 20:36
#2
er ikke helt med... :(
20. januar 2004 - 21:18
#3
er der nigen der gider at hjælpe mig med den her script ?
20. januar 2004 - 21:44
#4
hmmm
20. januar 2004 - 21:44
#5
nogen der vil give en hånd...?
20. januar 2004 - 22:00
#6
nåh, så må jeg lukke, hvis der ikker er nogen der gider at hjælpe mig :(
20. januar 2004 - 22:54
#7
<html> <head> <title>Indhold</title> <script language="JavaScript"> //-- function expandIt(whichEl){ El=document.getElementById('whichEl'); El.style.display=(El.style.display=="none")?"inline":"none"; } //-- </script> </head> <body> <table border="0" width="250" cellspacing="0" cellpadding="0" id="table1"> <tr> <td align="center"><a href="java script:expandIt('Elindhold')">Vis indhold</a></td> </tr> <span id="Elindhold" style="display: none;"> <tr> <td> <table border="0" width="250" cellspacing="0" cellpadding="0" id="table2"> <tr> <td width="250">Her skal den vise/skjule indhold</td> </tr> </table> </td> </tr> </span> </table> </body> </html>
21. januar 2004 - 21:03
#8
>> mm12010 virker ikke :(
21. januar 2004 - 21:44
#9
nu gør det !-) <html> <head> <title>Indhold</title> <script language="JavaScript"> //<!-- function expandIt(whichEl){ El=document.getElementById(whichEl); El.style.display=(El.style.display=="none")?"inline":"none"; } //--> </script> </head> <body> <table border="0" width="250" cellspacing="0" cellpadding="0" id="table1"> <tr> <td align="center"><a href="java script:expandIt('Elindhold')">Vis indhold</a></td> </tr> <tr> <td><div id="Elindhold" style="display: none;"> <table border="0" width="250" cellspacing="0" cellpadding="0" id="table2"> <tr> <td width="250">Her skal den vise/skjule indhold</td> </tr> </table> </div></td> </tr> </table> </body> </html>
Vi tilbyder markedets bedste kurser inden for webudvikling