객체 감추기/보이기 제어 > script

본문 바로가기

script

객체 감추기/보이기 제어

작성일 07-08-08 09:58

페이지 정보

작성자서방님 조회 602회 댓글 0건

본문

table에 걸어도 되고 tr에 걸어도 됨

<script>
function togDis(el)
{
 el.style.display = (el.currentStyle.display=='none') ? 'block' : 'none';
}
</script>

<a href="#" onclick="togDis(kaka);">toggle display</a>

<table id="kaka" style="display=none;">
 <tr>
  <td><input type="TEXT"></td>
 </tr>
 <tr id="myTr">
  <td><input type="TEXT"></td>
 </tr>
 <tr>
  <td><input type="TEXT"></td>
 </tr>
</table>

댓글목록

등록된 댓글이 없습니다.

게시물 검색
Copyright © 서방님.kr All rights reserved.
PC 버전으로 보기