user3264607
user3264607

Reputation:

How to convert a portion of image to clickable button?

enter image description here

this is image. In this i want to convert +sign part, - sign part as button .And the first part is a text box

enter image description here

how can i do that?

when + is clicked number need to be increased , - is clicked number need to be decreased .

Upvotes: 0

Views: 656

Answers (1)

Tariq
Tariq

Reputation: 2569

You can try map tag for your image

<img src="myImage.gif" width="180" height="126" usemap="#mymap">

<map name="mymap">
<area shape="rect" coords="<!-- cordinates-->" href="#" onclick="increase()" >
<area shape="rect" coords="<!-- cordinates-->" href="#" onclick="decrease()" >
</map>

You can also define cursor styles for you image portions.

Reference: http://www.w3schools.com/TAGS/tag_area.asp

Upvotes: 1

Related Questions