Area pathname 属性
定义和用法
pathname 属性设置或返回 href 属性值的路径名部分。
href 属性指定区域中链接的目的地。
注释: 在上面的示例中,IE 9 和更早版本返回"jsref/venus.htm",而 IE 10+、Firefox、Opera、Chrome 和 Safari 返回"/jsref/venus.htm"。
浏览器支持
| 属性 | |||||
|---|---|---|---|---|---|
| pathname | Yes | Yes | Yes | Yes | Yes |
语法
返回 pathname 属性:
areaObject.pathname
设置 pathname 属性:
areaObject.pathname = path
属性值
| 值 | 描述 |
|---|---|
| path | 指定 URL 的路径名 |
技术细节
| 返回值: | 字符串,表示 URL 的路径名 |
|---|
