Text ein-/ausblenden
So geht's! |
<script type="text/javascript">
//<![CDATA[
function swap(openlink,closelink, linkid, dataid)
{
if( document.getElementById(dataid).style.display == 'none')
{
document.getElementById(dataid).style.display='inline';
document.getElementById(linkid).firstChild.nodeValue=closelink;
} else
{
document.getElementById(dataid).style.display='none';
document.getElementById(linkid).firstChild.nodeValue=openlink;
}
}
//]]>
</script>
<table class="tab24" align="center" border="0" cellpadding="0" cellspacing="0" width="80%">
<tr bgcolor="#cccccc">
<td width="33%" height="35" style="padding-left:15px; padding-right:15px;">
</td>
<td width="75%" align="center">
<span style="color: #333333;"><b>Text ein- und ausblenden</b></span>
</td>
<td align="right" width="33%" style="padding-left:15px; padding-right:15px;">
<a href="#swap" onclick="javascript:swap('Einblenden','Ausblenden', 'swaplink', 'hideme')" id="swaplink" onfocus="this.blur()" name="swaplink">Einblenden</a>
</td>
</tr>
<tr style=" text-align: justify; font-size: 16px; font-weight: normal; background-color: rgb(50, 50, 50);">
<td colspan="3" style="padding-left:15px; padding-right:15px;">
<div id="hideme" style="display:none">
<br />
<div align="center">
Text
</p>
</div>
</td>
</tr>
</table>
Text ein- und ausblenden | Einblenden | |