Action on image html

Image Button

Name: Specifies the name of the object through which it can be referenced.
Src: Specifies the image source. i.e, the path of the image that has to be displayed.
Border: Specifies the border of the image source. If 0 is given, then no border will be displayed.
Alt: Specifies the alternate text that will appear if the image fails to load on a user’s screen.
height, width We can specify the dimensions of the image to display
formaction: URL ( address ) to which the form will be submitted, this takes precedence over the action attribute of the form.
formtarget: Where to display the target page ( response ), fromtarget=_blank will open a new window.
formenctype: The encoding methods , the are application/x-www-form-urlencoded , multipart/form-data, text/plain

Example:

This places an image button within the HTML form, which can be referenced by using its name «imgbtn» with a Alt text «Tool Tip». Tooltip refers to the text that has to be displayed when we place mouse over the image.

The image button will be displayed as below:

Example with a Web Form

Enter your name and click the button

Images can also act as hyperlinks just as normal text. Just as text is made as a hotspot so as an image. i.e, by enclosing the tag wtihin the . tags.

Example:

Note:

Here the image acts as a hotspot and navigates to the file target_page.htm
Just as an underline appears on the text if we enclose text within . tags, a border will appear for the image that has been placed with in . tags. You can remove the border by setting the border attribute of tag to 0.

Читайте также:  Python list remove elements by index

plus2net.com

Click here for More on FORM and HTML fields

  • Text Field to enter any (short ) text usually upto 100 chars length
  • Hidden Field to pass data not visible to user
  • Password Field Similar to text field but date entered is not masked or shown as **
  • TextArea Entering large amount of text
  • RadioButton Selecting one option out of many
  • Checkbox Selecting one or more option out of many
  • ButtonTo trigger user generated events or action
  • Image Button Used to click actions for some script of event to happen
  • Submit Button A button to all user entered data of a form
  • Two Submit ButtonsSubmitting same form data to two different forms
  • Submit new window Submitting form data to a new window
  • Reset Button A button to reset the form data
  • Drop-Down Menu Selecting one option from a list of option available in a list box or drop down menu
  • Datalist Options to Select with Auto Complete facility
  • Back Button Returning to previous page by clicking
  • File UploadUploading files to the server by using html form
  • Set focus Keeping cursor on input box at the time of page loading

Источник

Оцените статью