Area search attribute
Definition and Usage
search
attribute sets or returns href attribute value query string part.
href
The attribute specifies the destination of the link in the area.
The query string is the part after the question mark (?) in the URL, usually used for parameter passing.
See also:
JavaScript Reference Manual:location.search property
Example
Example 1
Return the URL query string of the specific area in the image map:
var x = document.getElementById("venus").search;
Example 2
Change the URL query string of the specific area in the image map:
document.getElementById("venus").search = "somenewsearchvalue";
Syntax
return search property:
areaObject.search
set search property:
areaObject.search = querystring
属性值
值 | 描述 |
---|---|
querystring | 规定 URL 的搜索部分。 |
技术细节
返回值: | 字符串值,表示 URL 的查询字符串部分,包括问号 (?)。 |
---|
浏览器支持
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
支持 | 支持 | 支持 | 支持 | 支持 |