JavaScript Reference/Javascript Objects/location — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Текущая версия на 08:22, 26 мая 2010
Содержание
"location" Example
<html>
<body>
<table id="myTable">
<tr>
<td>Row 1</td>
</tr>
<tr>
<td>Row 2</td>
</tr>
<tr><td>Row 3</td>
</tr>
</table>
<button onclick="myTable.style.fontWeight = "bold";">Bold</button>
<button onclick="location.reload();">Reload page</button>
</body>
</html>
"location" is applied to
+----------------+--------------------------------------------------------------+
| Applied_To |document window |
+----------------+--------------------------------------------------------------+
"location" JavaScript Methods
+----------------+--------------------------------------------------------------+
| JavaScript |assign reload |
| Methods |replace |
+----------------+--------------------------------------------------------------+
"location" JavaScript Properties
+----------------+--------------------------------------------------------------+
| JavaScript |hash host |
| Properties |hostname href |
| |pathname port |
| |protocol search |
+----------------+--------------------------------------------------------------+
"location" Syntax and Note
Note:
Basic information about the current site being visited.
Syntax:
objectName.location.memberName