HTML beginner |
|
<script language="javascript">
function toggleDisplay(TDID) {
var onoff;
var offon;
if(document.getElementById(TDID).style.display == 'block') {
onoff = 'none';
offon = 'block';
} else {
onoff = 'block';
offon = 'none';
}
return onoff;
return offon;
}
function showHide(TDID)
{
If(TDID == "1") {
var onoff = toggleDisplay(TDID);
var offon = toggleDisplay(TDID);
document.getElementById(TDID).style.display = onoff;
document.getElementById('2').style.display = offon;
} elseif(TDID == "2") {
var onoff = toggleDisplay(TDID);
var offon = toggleDisplay(TDID);
document.getElementById(TDID).style.display = onoff;
document.getElementById('1').style.display = offon;
}
}</script>
<script language="javascript"> function toggleDisplay(TDID) { var onoff; var offon; if(document.getElementById(TDID).style.display == 'block') { onoff = 'none'; offon = 'block'; } else { onoff = 'block'; offon = 'none'; } return onoff; return offon; } function showHide(TDID) { If(TDID == "1") { var onoff = toggleDisplay(TDID); var offon = toggleDisplay(TDID); document.getElementById(TDID).style.display = onoff; document.getElementById('2').style.display = offon; } elseif(TDID == "2") { var onoff = toggleDisplay(TDID); var offon = toggleDisplay(TDID); document.getElementById(TDID).style.display = onoff; document.getElementById('1').style.display = offon; } }</script>
<span id="1" style="display: block;"> <b> Gastenboek Menu </b> </span>
<span id="2" style="display:none; color: #ff9900; "> <b> Gastenboek Menu </b> </span>
<span id="1" style="display: block;"> <b> Gastenboek Menu </b> </span> <span id="2" style="display:none; color: #ff9900; "> <b> Gastenboek Menu </b> </span>
<a href="?page=gastenboek" onmouseover="showHide('1')" onmouseout="showHide('1')">Lees posts</a><br>
<a href="?page=gastenboek&action=schrijven" onmouseover="showHide('2')" onmouseout="showHide('2')">Voeg toe</a>
<a href="?page=gastenboek" onmouseover="showHide('1')" onmouseout="showHide('1')">Lees posts</a><br> <a href="?page=gastenboek&action=schrijven" onmouseover="showHide('2')" onmouseout="showHide('2')">Voeg toe</a>
De bedoeling is dat als je over een link heen gaat, dat dan een text ergens anders van kleur veranderd....
Kan iemand me hier mischien mee helpen?
|