jQuery | javascript | CSS

25.JavaScript - location객체 (로케이션객체)

Godffs 2009. 8. 11. 01:57
반응형
location객체는 홈페이지주소를 관리하는것 입니다.
사이트접속에 관한 예제입니다.


<script>
    function GoNaver() {
        location.href = "http://www.naver.com/";
    }
</script>

<input type="button" value="닷넷코리아로 이동"
    onclick="location.href='http://www.dotnetkorea.com/';" />

<!--마우스가 올라가면 바로 해당 이벤트 실행-->
<table border="1" onmouseover="GoNaver();">
    <tr>
        <td>마우스를 올려보세요...</td>
    </tr>
</table>

<a href="#" onclick="location.reload();">현재 페이지 새로고침</a>
<a href="Javascript:location.reload();">현재 페이지 새로고침</a>



반응형