JavaScript Reference/Javascript Properties/search — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Текущая версия на 08:21, 26 мая 2010
"search" Example
<html>
<body>
<script language="JavaScript">
function function1() {
alert(document.getElementById("myA").search);
}
</script>
<a id="myA"
href="http://www.wbex.ru?index"
target="_blank">wbex.ru Site</a>
<input type="Button" id="myB" value="Wescom Advocar" onClick="function1();">
</body>
</html>
"search" is applied to
+----------------+--------------------------------------------------------------+
| Applied_To |<a> <area> |
| |location |
+----------------+--------------------------------------------------------------+
"search" Syntax and Note
Note:
Read and write property.
When a question mark (?) exists in a URL, this property
specifies the string that follows the question mark.
Syntax:
document.getElementById("elementID").search = value
document.all.elementID.search = value // IE only
document.location.search = value