HTML DOM pathname 属性
定义和用法
pathname 属性可设置或返回某个区域中 link-URL 的路径名。
语法
areaObject.pathname=pathnamee
实例
下面的例子可返回 "Venus" 区域中 link-URL 的路径名:
<html>
<body>
<img src=/w3c/jsref/"planets.gif" __width="145" height="126" __usemap="" />
</map>
<p>Venus' pathname:
<script type="text/javascript">
x=document.getElementById('venus');
document.write(x.pathname
);
</script>
</p>
</body>
</html>