Button Field of a Web form

A Button will not perform any action when we click on it unless some action has been explicitly written by the user. A generic button can be created as :
<input type="button" name="Name of the button" value="Click Me">
OR
<button name="Name of the button" >Click Me</button>

Attributes of Button Field:

Name: Specifies the name of the object through which it can be referenced.
Value: Specifies the value of the button field. This will be the text that is going to be displayed on the button.

Example:

<input type="button" name="btn" value="Click">

This places a button within the HTML form, which can be referenced by using its name "btn" and whose value is "Click".
The button will be displayed as below:

Attributes

  • type: Specifies the type of button. Possible values include "button" (default), "submit," and "reset."
  • name: Provides a name for the button, used when submitting form data.
  • value: Specifies the value associated with the button.
  • disabled: Disables the button to prevent user interaction.
  • form: Associates the button with a specific form element.
  • autofocus: Automatically focuses the button on page load.
  • formaction: Specifies the URL for form submission.
  • formmethod: Specifies the HTTP method for form submission. GET or POST
  • formenctype: Specifies the encoding type for form data.
  • formtarget: Specifies where to display the response from form submission.
    _blank, _self, _parent, _top
  • formnovalidate: Disables form validation during button click.
  • accesskey: Defines a keyboard shortcut for button activation.
  • title: Provides additional information as a tooltip.
  • onclick: Specifies JavaScript code for button click action.
Script / Application Description
Button as LinkHow to use buttons as hyper link to navigate to different pages
Hyper LinkHyper Links to click and visit another page
Opening a new windowHyper Links to click and open a new window
Opening child windowOpening child window using JavaScript
Linking within pageCreating links to different sections of the same page
Part of Image as linkImage map to use part of the image for different hyper links
Mailto LinkOpening client email application with to post email

HTML Form Reset button Hidden field

Subscribe

* indicates required
Subscribe to plus2net

    plus2net.com







    Post your comments , suggestion , error , requirements etc here




    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2024 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer