input button
HTML input button Element
Setting the HTML input element's type attribute to "button" will render a button with no specific behavior. Unlike the "submit" type of input this type will not automatically submit a web <form>. I personally use this button type input for engaging users in Javascript functionality on my pages and forms that process using Ajax instead of the traditional way.
This example shows how to bind a Javascript function to a generic button to bring the little generic sucker to life.
Value: "button"
name - specify the input's name that your form parsing script will access
Possible Values: "short descriptive name"
value - specify the button's value
Possible Values: "a string"
disabled - specify that the input be disabled
Possible Values: "disabled"
global attributes - global core attributes
See: list of global attributes
Possible Values: "a form's id attribute value"
autofocus - specify that the input receive focus when page is loaded
Possible Values: "autofocus"
HTML CODE EXAMPLE
<input type="button" value="Generic Button">
HTML CODE EXAMPLE
<input type="button" value="Click Me" onclick="alert('Javascript!')">
Attributes for this element:
type - specify the type of inputValue: "button"
name - specify the input's name that your form parsing script will access
Possible Values: "short descriptive name"
value - specify the button's value
Possible Values: "a string"
disabled - specify that the input be disabled
Possible Values: "disabled"
global attributes - global core attributes
See: list of global attributes
New HTML5 attributes for this element:(applies 2014)
form - set a relationship between the input and a formPossible Values: "a form's id attribute value"
autofocus - specify that the input receive focus when page is loaded
Possible Values: "autofocus"
0 Response to "input button"
Post a Comment