Latest web development tutorials

HTML DOM 지역 해시 속성

지역의 객체 참조 지역 객체

정의 및 사용

g 해시 속성 집합 또는 href 속성 가치의 앵커 부분을 반환한다.

문법

areaObject.hash=anchorname


브라우저 지원

Internet ExplorerFirefoxOperaGoogle ChromeSafari

모든 주요 브라우저는 해시 속성을 지원


다음은 href 속성의 "비너스"앵커 단면적을 반환합니다 :

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>本教程(w3big.com)</title>
</head>
<body>

<img src="planets.gif" width="145" height="126" usemap="#planetmap">
<map name="planetmap">
<area id="venus" shape="circle" coords="124,58,8" alt="Venus" href="venus.htm#description">
</map>
<p>金星href属性的锚:
<script>
document.write(document.getElementById("venus").hash);
</script>
</p>

</body>
</html>

위의 출력의 예 :

金星href属性的锚: #description

»시도


지역의 객체 참조 지역 객체