Javascript image map

Source: Internet
Author: User
Javascript image map: An image map is an image with a clickable area.Simple HTML image ing

<HTML>

<Body>

<Map Name = "planetmap" id = "planetmap">

<Area shape = "circle" coords = "180,139, 14"
Href = "../example/html/venus.html" target = "_ blank" alt = "Venus"/>

<Area shape = "circle" coords = "129,161, 10"
Href = "../example/html/mercur.html" target = "_ blank" alt = "Mercury"/>

<Area shape = "rect" coords = "0, 0, 110,260"
Href = "../example/html/sun.html" target = "_ blank" alt = "sun"/>

</Map>

</Body>
</Html>
Added JavaScript image ing.

 

<HTML>
<Head>
<SCRIPT type = "text/JavaScript">
Function writetext (txt)
{
Document. getelementbyid ("DESC"). innerhtml = txt
}
</SCRIPT>
</Head>

<Body>

<Map Name = "planetmap" id = "planetmap">

<Area shape = "circle" coords = "180,139, 14"
Onmouseover = "writetext ('until 1960s, Venus was considered as the twin sister of the earth, because Venus is the closest planet to us, and because both have many common characteristics. ')"
Href = "../example/html/venus.html" target = "_ blank" alt = "Venus"/>

<Area shape = "circle" coords = "129,161, 10"
Onmouseover = "writetext ('it is difficult to study mercury from Earth, because it is always very close to the sun. ')"
Href = "../example/html/mercur.html" target = "_ blank" alt = "Mercury"/>

<Area shape = "rect" coords = "0, 0, 110,260"
Onmouseover = "writetext ('the sun and a gas planet like Jupiter are the largest objects in the solar system so far. ')"
Href = "../example/html/sun.html" target = "_ blank" alt = "sun"/>

</Map>

<P id = "DESC"> </P>

</Body>
</Html>


 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.