当前位置: 首页 > 网络学院 > 客户端脚本教程 > HTML DOM > HTML DOM target属性
The target property sets or returns where to open the link-URL in an area.
target属性可设置或返回area中连接的打开方式
areaObject.target=_blank|_parent|_self|_top |
The following example changes the target of the link in the image-map:
下面的举例将改变热点图片中连接的打开方式:
<html> <head> <script type="text/javascript"> function changeTarget() { document.getElementById('venus').target="_blank" } </script> </head> <body> <img src ="planets.gif" width="145" height="126" alt="Planets" usemap ="#planetmap" /> <map name ="planetmap"> <area shape ="circle" coords ="124,58,8" href ="venus.htm" id="venus" /> </map> <br /> <input type="button" onclick="changeTarget()" value="Change target" /> </body> </html> |
Change the target of a link in an image-map
改变热点地图的连接target