JavaScript Reference/Javascript Properties/isMap

Материал из Web эксперт
Перейти к: навигация, поиск

"isMap" Example

    
<html>
<head>
</head>
<body>
<img src="yourimage.gif" id="myImg" alt="" width="200" height="100" usemap="#myMap2"> 
<map name="myMap2"> 
    <area id="area1" 
          shape="rect" 
          href="http://www.wbex.ru" 
          alt="wbex.ru" 
          onClick="return false">
</map>
<br>
<button onclick="alert(myImg.isMap);">IS MAP</button>
</body>
</html>



"isMap" is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |<img>                                                         |
+----------------+--------------------------------------------------------------+



"isMap" Possible Values

Possible Values
true 
false.



"isMap" Syntax and Note

Note:
Read and write property. 
Should image act as a server-side map. 
    
Syntax:
    
document.getElementById("imgID").isMap = value
document.all.imgID.isMap = value // IE only