Tab Basic

On/HtmlCss 2011.05.26 13:10


<HTML>

 <HEAD>
<style type="text/css">

.contentab ul{
margin: 4px;
padding: 3px 0;
margin-left: 0;
font: bold 12px Verdana;
border-bottom: 1px solid gray;
list-style-type: none;
text-align: left; /*set to left, center, or right to align the menu as desired*/
}

.contentab li{
display: inline;
margin: 0;
}

.contentab li a{
text-decoration: none;
padding: 3px 7px;
margin-right: 3px;
border: 0px solid gray;
border-bottom: none;
background-color: #fff;
color: #2d2b2b;
}

.contentab li a:visited{
color: #2d2b2b;
}


.contentab li a.current{
background-color: #fff;
color: black;
border: 1px solid gray;
border-bottom: 1px solid #FFF;
}

.contentab li a:hover, .contentab li a.current{
background-color: #fff;
color: black;
border: 1px solid gray;
border-bottom: 1px solid #FFF;
}

.contentab li a:active{
color: black;
}

#contentabox{
width:95%; /*width of 2nd level content*/
height:1.5em; /*height of 2nd level content. Set to largest's content height to avoid jittering.*/
}

.boxcontent{
display:none;
}

</style>


<script type="text/javascript">

/***********************************************
* DD Tab Menu script- ⓒ Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

//Set tab to intially be selected when page loads:
//[which tab (1=first tab), ID of tab content to display (or "" if no corresponding tab content)]:
var initialtab=[1, "content1"]

//Turn menu into single level image tabs (completely hides 2nd level)?
var turntosingle=0 //0 for no (default), 1 for yes

//Disable hyperlinks in 1st level tab images?
var disabletablinks=0 //0 for no (default), 1 for yes


////////Stop editting////////////////

var previoustab=""

if (turntosingle==1)
document.write('<style type="text/css">\n#tabcontentcontainer{display: none;}\n</style>')

function expandcontent(cid, aobject){
if (disabletablinks==1)
aobject.onclick=new Function("return false")
if (document.getElementById && turntosingle==0){
highlighttab(aobject)
if (previoustab!="")
document.getElementById(previoustab).style.display="none"
if (cid!=""){
document.getElementById(cid).style.display="block"
previoustab=cid
}
}
}

function highlighttab(aobject){
if (typeof tabobjlinks=="undefined")
collectddtabs()
for (i=0; i<tabobjlinks.length; i++)
tabobjlinks[i].className=""
aobject.className="current"
}

function collectddtabs(){
var tabobj=document.getElementById("origintabs")
tabobjlinks=tabobj.getElementsByTagName("A")
}

function do_onload(){
collectddtabs()
expandcontent(initialtab[1], tabobjlinks[initialtab[0]-1])
}

if (window.addEventListener)
window.addEventListener("load", do_onload, false)
else if (window.attachEvent)
window.attachEvent("onload", do_onload)
else if (document.getElementById)
window.onload=do_onload

</script> </HEAD>

 <BODY>
  <div id="origintabs" class="contentab">
<ul>
<li><a href="#" onMouseover="expandcontent('content1', this)">Article</a></li>
<li><a href="#" onMouseover="expandcontent('content2', this)">Comment</a></li>
<li><a href="#" onMouseover="expandcontent('content3', this)">Trackback</a></li>
<li><a href="#">by dedo</a></li>
</ul>
</div>

<DIV id="contentabox">

<div id="content1" class="boxcontent">
Return to the <a href="http://www.dynamicdrive.com">frontpage</a> of Dynamic Drive.
</div>

<div id="content2" class="boxcontent">
See the new scripts recently added to Dynamic Drive. <a href="http://www.dynamicdrive.com/new.htm">Click here</a>.
</div>

<div id="content3" class="boxcontent">
Original, practical <a href="http://www.dynamicdrive.com/style/">CSS codes and examples</a> such as CSS menus for your site.
</div>

</DIV> </BODY>

</HTML>

posted by 大道
tab

selectbox.htc - access denied error

Personal/Delegated 2011.03.10 11:28

일반 테스트 환경에서는 잘되는데
티스토리에 올리니 튕긴다. - 당장 해결하기에는 시간이 걸린다.
posted by 大道
tab