레이어 클릭할때마다 보였다 안 보였다 하기.
페이지 정보
작성자 최고관리자 작성일 21-02-10 17:36 조회 7,056 댓글 0본문
<script language="javascript">
function areaView( code )
{
eval("var arealayer = area" + code + ".style.display;");
if(arealayer == "none"){
eval("area" + code + ".style.display = '';");
}else{
eval("area" + code + ".style.display = 'none';");
}
}
</script>
<table>
<tr>
<td><span OnClick="areaView(1)" style="cursor:hand">Aarea</span></td>
</tr>
<tr id="area1" style="display:none;">
<td> aaaaa </td>
</tr>
<tr>
<td><span OnClick="areaView(2)" style="cursor:hand">Barea</span></td>
</tr>
<tr id="area2" style="display:none;">
<td> bbbb </td>
</tr>
</table>
function areaView( code )
{
eval("var arealayer = area" + code + ".style.display;");
if(arealayer == "none"){
eval("area" + code + ".style.display = '';");
}else{
eval("area" + code + ".style.display = 'none';");
}
}
</script>
<table>
<tr>
<td><span OnClick="areaView(1)" style="cursor:hand">Aarea</span></td>
</tr>
<tr id="area1" style="display:none;">
<td> aaaaa </td>
</tr>
<tr>
<td><span OnClick="areaView(2)" style="cursor:hand">Barea</span></td>
</tr>
<tr id="area2" style="display:none;">
<td> bbbb </td>
</tr>
</table>
댓글목록 0
등록된 댓글이 없습니다.