The image button

We can add an image button to a form by using the <input> element with the type attributes set to "image". Other useful attributes for the image button ate

src - to specify the URL of the image
name - to identify the image
align - to align the image relative to the other elements
disabled - to disable the element

Note
Each time the user clicks on the image, the form data is submitted, so the submit button is not needed.
The data submitted by the image button is in the format element_name.x=x-coordinate, element_name.y=y-coordinate where
- element_name - the vaue of the name attribute element assigned to the image element
- x-coordinate and y-coordinate are the x and y coordinates respectively
The image button is is a server side image map and the server should have an application that reads and processes the data submitted.
More than one image button can be attached to the same
element. Name attribute must be used to differentiate them.


Related Tutorial
Follow Us
https://www.facebook.com/Rookie-Nerd-638990322793530 https://twitter.com/RookieNerdTutor https://plus.google.com/b/117136517396468545840 #
Contents +