Location對象
location用於獲取或設置窗體的URL,並且可以用於解析URL。
語法:
location.[屬性|方法]
location對象屬性圖示:
location 對象屬性:
location 對象方法:
demo:<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>location</title>
</head>
<script type="text/javascript">
alert( location.href);
</script>
</head>
<body>
</body>
</html>