본문 바로가기
개발

[html] 텝을 활용한 메뉴버튼

by 똘또히 2016. 8. 26.

한페이지내에서 두페이지 혹은 두가지 메뉴에 대한  부분을 텝버튼을 활용하여 보여주기가 필요할때 사용하는 버튼 입니다.


<script language="javascript"> 

function btnShow(find) { 
  
 document.all.find.style.display = "none"; 
 document.all.find2.style.display = "none"; 
  
 var obj = eval("document.all." + find); 
 obj.style.display = "block"; 


</script> 

========================================== 

<a href="javascript:btnShow('find')" ><input type="button" value="버튼명"></a> 
<a href="javascript:btnShow('find2')" ><input type="button" value="버튼명"></a> 

<div  id="find" style="display:none;"> 
나타낼 내용 작성 1 
</div> 
<div  id="find2" style="display:none;"> 
나타낼 내용 작성 1222 
</div> 




[실 예제]