묻고답하기
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
자바스크립트로 만든 메뉴 질문입니다.
2006.05.09 12:18
<html>
<head>
<title>제목 없음</title>
</head>
<body onLoad="getmenuImg();">
<script language="javascript">
<!--
var openImg = ""
var closeImg = ""
function getmenuImg(){
if(document.images){
openImg = new Image
closeImg = new Image
openImg.src = "http://www.sourcenara.com/SourcenaraScript/menu/leftbu/menu6/open.gif"
closeImg.src = "http://www.sourcenara.com/SourcenaraScript/menu/leftbu/menu6/closed.gif"
}}
function viewMenu(which,which2){
if (which.style.display=='none'){
which.style.display='';
which2.src=openImg.src
}
else{
which.style.display='none'
which2.src=closeImg.src
}
}
-->
</script>
<!--첫번째 메뉴 설정-->
<span id="menu1" onClick="viewMenu(menu1outline,menu1sign)" style="cursor:hand;
font-Family:굴림; text-decoration:underline; font-weight:bold">
<img id="menu1sign" src="http://www.sourcenara.com/SourcenaraScript/menu/leftbu/menu6/closed.gif" valign="bottom">Subject1</span><br>
<span id="menu1outline" style="display:'none'">
→ <a href="http://www.sourcenara.com" target="_blank">Subject1-1</a><br>
→ <a href="http://www.sourcenara.com" target="_blank">Subject1-1</a><br>
</span>
<!--두번째 메뉴 설정-->
<span id="menu2" onClick="viewMenu(menu2outline,menu2sign)" style="cursor:hand;
font-Family:굴림; text-decoration:underline; font-weight:bold">
<img id="menu2sign" src="http://www.sourcenara.com/SourcenaraScript/menu/leftbu/menu6/closed.gif" valign="bottom">Subject2</span><br>
<span id="menu2outline" style="display:'none'">
→ <a href="http://www.sourcenara.com" target="_blank">Subject2-1</a><br>
→ <a href="http://www.sourcenara.com" target="_blank">Subject2-2</a><br>
→ <a href="http://www.sourcenara.com" target="_blank">Subject2-3</a><br>
</span>
<!--세번째 메뉴 설정-->
<span id="menu3" onClick="viewMenu(menu3outline,menu3sign)" style="cursor:hand;
font-Family:굴림; text-decoration:underline; font-weight:bold">
<img id="menu3sign" src="http://www.sourcenara.com/SourcenaraScript/menu/leftbu/menu6/closed.gif" valign="bottom">Subject3</span><br>
<span id="menu3outline" style="display:'none'">
→ <a href="http://www.sourcenara.com" target="_blank">Subject3-1</a><br>
→ <a href="http://www.sourcenara.com" target="_blank">Subject3-1</a><br>
→ <a href="http://www.sourcenara.com" target="_blank">Subject3-1</a><br>
</span>
</body>
</html>
위 소스는 소스나라에 있는 클릭하면 메뉴 나오고 다시 클릭하면 닫히는 메뉴소스인데요
주메뉴 Subject 앞에 폴더모양아이콘이 나타나거든요.
앞에 폴더아이콘 모양 없이 글자만 나오게 쓰려면 어떻게 해야되나요?
예제는 아래링크 페이지의 15번에 있습니다.
http://www.sourcenara.com//SourcenaraScript/index.htm
<head>
<title>제목 없음</title>
</head>
<body onLoad="getmenuImg();">
<script language="javascript">
<!--
var openImg = ""
var closeImg = ""
function getmenuImg(){
if(document.images){
openImg = new Image
closeImg = new Image
openImg.src = "http://www.sourcenara.com/SourcenaraScript/menu/leftbu/menu6/open.gif"
closeImg.src = "http://www.sourcenara.com/SourcenaraScript/menu/leftbu/menu6/closed.gif"
}}
function viewMenu(which,which2){
if (which.style.display=='none'){
which.style.display='';
which2.src=openImg.src
}
else{
which.style.display='none'
which2.src=closeImg.src
}
}
-->
</script>
<!--첫번째 메뉴 설정-->
<span id="menu1" onClick="viewMenu(menu1outline,menu1sign)" style="cursor:hand;
font-Family:굴림; text-decoration:underline; font-weight:bold">
<img id="menu1sign" src="http://www.sourcenara.com/SourcenaraScript/menu/leftbu/menu6/closed.gif" valign="bottom">Subject1</span><br>
<span id="menu1outline" style="display:'none'">
→ <a href="http://www.sourcenara.com" target="_blank">Subject1-1</a><br>
→ <a href="http://www.sourcenara.com" target="_blank">Subject1-1</a><br>
</span>
<!--두번째 메뉴 설정-->
<span id="menu2" onClick="viewMenu(menu2outline,menu2sign)" style="cursor:hand;
font-Family:굴림; text-decoration:underline; font-weight:bold">
<img id="menu2sign" src="http://www.sourcenara.com/SourcenaraScript/menu/leftbu/menu6/closed.gif" valign="bottom">Subject2</span><br>
<span id="menu2outline" style="display:'none'">
→ <a href="http://www.sourcenara.com" target="_blank">Subject2-1</a><br>
→ <a href="http://www.sourcenara.com" target="_blank">Subject2-2</a><br>
→ <a href="http://www.sourcenara.com" target="_blank">Subject2-3</a><br>
</span>
<!--세번째 메뉴 설정-->
<span id="menu3" onClick="viewMenu(menu3outline,menu3sign)" style="cursor:hand;
font-Family:굴림; text-decoration:underline; font-weight:bold">
<img id="menu3sign" src="http://www.sourcenara.com/SourcenaraScript/menu/leftbu/menu6/closed.gif" valign="bottom">Subject3</span><br>
<span id="menu3outline" style="display:'none'">
→ <a href="http://www.sourcenara.com" target="_blank">Subject3-1</a><br>
→ <a href="http://www.sourcenara.com" target="_blank">Subject3-1</a><br>
→ <a href="http://www.sourcenara.com" target="_blank">Subject3-1</a><br>
</span>
</body>
</html>
위 소스는 소스나라에 있는 클릭하면 메뉴 나오고 다시 클릭하면 닫히는 메뉴소스인데요
주메뉴 Subject 앞에 폴더모양아이콘이 나타나거든요.
앞에 폴더아이콘 모양 없이 글자만 나오게 쓰려면 어떻게 해야되나요?
예제는 아래링크 페이지의 15번에 있습니다.
http://www.sourcenara.com//SourcenaraScript/index.htm
<head>
<title>제목 없음</title>
</head>
<body>
<script language="javascript">
<!--
function viewMenu(which){
if (which.style.display=='none'){
which.style.display='';
}
else{
which.style.display='none'
}
}
-->
</script>
<!--첫번째 메뉴 설정-->
<span id="menu1" onClick="viewMenu(menu1outline)" style="cursor:hand;
font-Family:굴림; text-decoration:underline; font-weight:bold">Subject1</span><br>
<span id="menu1outline" style="display:'none'">
→ <a href="http://www.sourcenara.com" target="_blank">Subject1-1</a><br>
→ <a href="http://www.sourcenara.com" target="_blank">Subject1-1</a><br>
</span>
<!--두번째 메뉴 설정-->
<span id="menu2" onClick="viewMenu(menu2outline)" style="cursor:hand;
font-Family:굴림; text-decoration:underline; font-weight:bold">Subject2</span><br>
<span id="menu2outline" style="display:'none'">
→ <a href="http://www.sourcenara.com" target="_blank">Subject2-1</a><br>
→ <a href="http://www.sourcenara.com" target="_blank">Subject2-2</a><br>
→ <a href="http://www.sourcenara.com" target="_blank">Subject2-3</a><br>
</span>
<!--세번째 메뉴 설정-->
<span id="menu3" onClick="viewMenu(menu3outline)" style="cursor:hand;
font-Family:굴림; text-decoration:underline; font-weight:bold">Subject3</span><br>
<span id="menu3outline" style="display:'none'">
→ <a href="http://www.sourcenara.com" target="_blank">Subject3-1</a><br>
→ <a href="http://www.sourcenara.com" target="_blank">Subject3-1</a><br>
→ <a href="http://www.sourcenara.com" target="_blank">Subject3-1</a><br>
</span>
</body>
</html>