-
자바스크립트 접기 펴기카테고리 없음 2012. 8. 28. 00:00
//javascript
------------------------------------------------------
<script>
function view(arg){
if(arg=="1"){
document.all.sub1.style.display="none";
}else{
document.all.sub1.style.display="";
}
}
</script>
-----------------------------------------------------
//html - control
<ul>
<li><input type="radio" name="authorize" value="on" onClick = "javascript:view('1')" /><label>all</label></li>
<li><input type="radio" name="authorize" value="off" onClick = "javascript:view('0')" /><label>not all</label></li>
</ul>
//html - view
------------------------------------------------------
<div id="sub1" style="display:none;">
<table>
<tr>
<th>as</th>
<td>123123123</td>
</tr>
</table>
</div>
---------------------------------------------------------