만약 당신이 지금
http://www.test.com/ver2/index.php?wr_id=4&bbs=free
라는 위치라면
location.protocol : http:
location.host : www.test.com (주소)
location.pathname : /ver2/index.php (경로)
location.search : ?wr_id=4&bbs=free (파라미터)
저는 보통 아래와 같이 사용합니다.
[code language="javascript"]
function doLogin(){
location.href='/bbs/login.php?url='+urlencode(location.pathname + location.search);
}
[/code]
Conversation
In the margins
0 notes
No comments yet. Be the first to leave a note.