반응형
//숫자를 이용하는 방법
function My(num)
{if ( num == 1){ location.href="/index.htm" return; }if ( num == 2){ location.href="/etc/private.htm" return; }}//<a href="My(1);" onfocus="this.blur()" title="기본정보변경">기본정보변경</a>
//문자를 이용하는 방법
function getTop(code){if ( code == "home")
{ location.href="/index.htm" return; }if ( code == "login")
{ window.open('/login.htm','login','width=400,height=220'); return; }}//
<a href="getTop('login');">로그인</a>
http://cmlog.net/cmlog/entry/스크립트로-페이지를-이동시키자