링크를 누루면 페이지로 넘어갓을때 색상이 바뀌는 소스좀 알려주세요

링크를 누루면 페이지로 넘어갓을때 색상이 바뀌는 소스좀 알려주세요

QA

링크를 누루면 페이지로 넘어갓을때 색상이 바뀌는 소스좀 알려주세요

본문

그누보드 상단메뉴를 직접 수정중인데

 

f92b3ddddfdb60fb6cf7e1d7e09aa84c_1494708378_7809.JPG
 

이런식으로 링크를 클릭하면 페이지가 넘어가면서 색상이 자동으로 바뀌는것을 못하겠네요

 

용어도 모르는데 다른싸이트 보니 링크 클릭하면 뒤에 class="on" 뒤에 이런식으로 붙더라고요

 

어떻게 어디서 부터해야하는지 모르겠네요

 

<script type="text/javascript">
//클릭된 메뉴를 기억하기 위한 전역변수
var _clickedMenu="";
 
//메뉴 클릭시 작동
function changeTextColor(clickedMenu) {
 //모든 메뉴를 검정색으로 변경
 document.getElementById("m_home").style.color="#000000";
 document.getElementById("m_about").style.color="#000000";
 document.getElementById("m_product").style.color="#000000";
 document.getElementById("m_gallery").style.color="#000000";
 document.getElementById("m_blog").style.color="#000000";
 document.getElementById("m_contact").style.color="#000000";
 //클릭한메뉴를 빨강으로 변경
 clickedMenu.style.color="#ff0000";
 //클릭한메뉴를 전역변수에 저장
 _clickedMenu=clickedMenu.text;
}
//메뉴에 마우스 오버시 작동
function setOnColor(hoveredMenu) {
 //폰트색을 빨강으로 변경
 hoveredMenu.style.color="#ff0000";
}
//메뉴에 마우스 아웃시 작동
function setOutColor(outedMenu) {
 //마우스 아웃한 메뉴가 클릭한 메뉴라면 함수를 바로 빠져나온다.
 if(outedMenu.text==_clickedMenu) return false;
 //색깔을 검정으로 변경
 outedMenu.style.color="#000000";
}
</script>
</head>
<body>
<div class="menu_frame">
 <div class="menu_group">
  <a href="home.html" target="frame1" id="m_home" onclick="changeTextColor(this);" onmouseover="setOnColor(this);" onmouseout="setOutColor(this);">HOME</a>
  <a href="about.html" target="frame1" id="m_about" onclick="changeTextColor(this);" onmouseover="setOnColor(this);" onmouseout="setOutColor(this);">ABOUT</a>
  <a href="home.html" target="frame1" id="m_product" onclick="changeTextColor(this);" onmouseover="setOnColor(this);" onmouseout="setOutColor(this);">PRODUCT</a>
  <a href="home.html" target="frame1" id="m_gallery" onclick="changeTextColor(this);" onmouseover="setOnColor(this);" onmouseout="setOutColor(this);">GALLERY</a>
  <a href="home.html" target="frame1" id="m_blog" onclick="changeTextColor(this);" onmouseover="setOnColor(this);" onmouseout="setOutColor(this);">BLOG</a>
  <a href="home.html" target="frame1" id="m_contact" onclick="changeTextColor(this);" onmouseover="setOnColor(this);" onmouseout="setOutColor(this);">CONTACT</a>
 </div>
</div>
<div class="contents">
 <iframe width="1024" height="768" name="frame1"></iframe>
</div>


 

그나마 하나 찾았는데 마지막에 프레임이 문제인가

어떻게 연결해야하는지도 모르겠네요..


고수분들 소스좀 만들어주시거나 좋은 예제가 있으면 알려주십세요 꾸벅~

 

이 질문에 댓글 쓰기 :

답변 2

해당 파라미터 또는 해당 URL 로 검사해서 만드는 프로세스를 구축해야 합니다.

그누보드5 기본형에는 현재위치를 나타내는 소스가 포함되어 있지 않습니다.

http://webdir.tistory.com/452 에 적어둔 팁이 있는데 참고가 되실지 모르겠네요. 

답변을 작성하시기 전에 로그인 해주세요.
전체 7
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT