JavaScript Reference/Javascript Properties/isMap

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

"isMap" Example

   <source lang="javascript">
   

<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>
<button onclick="alert(myImg.isMap);">IS MAP</button> </body> </html>


     </source>
   
  


"isMap" is applied to

   <source lang="javascript">

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

     </source>
   
  


"isMap" Possible Values

   <source lang="javascript">

Possible Values true false.


     </source>
   
  


"isMap" Syntax and Note

   <source lang="javascript">

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


     </source>