First text | Second text | Third text |
MSDN Library Visual Studio 6.0 release The MSDN Library is the essential
reference for developers, with more than a gigabyte of technical programming information,
including sample code, documentation, technical articles, the Microsoft Developer
Knowledge Base, and anything else you might need to develop solutions that implement
Microsoft technology.
|
<script>
function show(asd,i)
{
for (var x=0;x<document.all.item("CHILD").length;x++)
document.all.item("CHILD",x).style.display="none";
document.all.item("CHILD",i).style.display="";
}
</script>
<body bgcolor="#C0C0C0">
Главная таблица
<table border="0" cellpadding="0" cellspacing="0"
width="100%" bgcolor="#00FF00">
<tr>
<td width="33%" bgcolor="#FF0000"
onClick="show(this,0)">First text</td>
<td width="33%" bgcolor="#FFFF00"
onClick="show(this,1)">Second text</td>
<td width="34%" onClick="show(this,2)">Third text</td>
</tr>
</table>
1 таблица
<table ID="CHILD" border="0" cellpadding="0"
cellspacing="0" width="100%"
style="display; position:relative">
<tr>
<td width="100%">1<p>1</p>
<p>1</p>
<p> </td>
</tr>
</table>
2 таблица
<table ID="CHILD" border="0" cellpadding="0"
cellspacing="0" width="100%"
style="display:none; position:relative">
<tr>
<td width="100%">2<p>2</p>
<p> </td>
</tr>
</table>
3 таблица
<table ID="CHILD" border="0" cellpadding="0"
cellspacing="0" width="100%"
style="display:none; position:relative">
<tr>
<td width="100%">3<p>3</p>
<p>3</p>
<p>3</p>
<p> </td>
</tr>
</table>
<p style="position:absolute">Дальше ваш текст</p>