select制御表示隠し
1452 ワード
<script>
function setChange()
{
if (document.f.selfs.value == "1")
{
tb1.style.display = "block";
}
else
{
tb1.style.display = "none";
}
if (document.f.selfs.value == "2")
{
tb2.style.display = "block";
}
else
{
tb2.style.display = "none";
}
}
</script>
<form name=f>
<select name="selfs" size="1 onchange="setChange()">
<option selected> </option>
<option value="1"> 1</option>
<option value="2"> 2</option>
</select>
<table id='tb1' style='DISPLAY:none'>
1 1 1
</table>
<table id='tb2' style='DISPLAY:none'>
2 2 2
</table>
</form>