JavaScript 参考手册
HTML DOM title 属性
返回图像中的区域地图标题
源代码:
点击运行 »
<img src="/examples/planets.gif" width="145" height="126" alt="Planets" usemap="#planetmap" /> <map name="planetmap"> <area id="venus" shape="circle" coords ="124,58,8" title="Venus" href ="venus.htm" /> </map> <p>金星区域的标题 (鼠标经过金星): <script> var x = document.getElementById('venus'); document.write(x.title); </script> </p>
运行结果:
点击运行 »