показаване и скриване на информация с ‘radio’ бутон
Автор: burkoff
много се чудех дали да го пусна …
ПУСКАМ ТОЗИ УРОК САМО ЗАЩОТО ГО ИСКАХТЕ В КОМЕНТАРИТЕ НА ПРЕДНИЯ
<script type="text/JavaScript">
function showlaptop(theTable)
{
if (document.getElementById(theTable).style.display == 'none')
{
document.getElementById(theTable).style.display = 'block';
}
}
function hidelaptop(theTable)
{
if (document.getElementById(theTable).style.display == 'none')
{
document.getElementById(theTable).style.display = 'none';
}
else
{
document.getElementById(theTable).style.display = 'none';
}
}
//-->
</script>
<input type="radio" name="pctype" value="desktop" onfocus="hidelaptop('laptop');return false;" checked />скрий<input type="radio" name="pctype" value="laptop" onfocus="showlaptop('laptop');return true;"/> покажи
<div id="laptop" style="display: none;">
<table style="border:1px dashed #000000"; width='100' height='100'>
<tr>
<td>
<p>текста или нещо друго</p>
</td>
</tr>
</table>
</div>

