<p>The <strong class=html>BUTTON</strong> element defines a <em>submit button, reset button, or push button</em>. Authors can also use <strong class=html><a href="input.html">INPUT</a></strong> to specify these buttons, but the <strong class=html>BUTTON</strong> element allows richer labels, including images and emphasis. However, <strong class=html>BUTTON</strong> is new in HTMLá4.0 and poorly supported among current browsers, so <strong class=html>INPUT</strong> is a more reliable choice at this time.</p>
<p>The <strong class=html>TYPE</strong> attribute of <strong class=html>BUTTON</strong> specifies the kind of button and takes the value <strong class=html>submit</strong> (the default), <strong class=html>reset</strong>, or <strong class=html>button</strong>. The <strong class=html>NAME</strong> and <strong class=html>VALUE</strong> attributes determine the name/value pair sent to the server when a submit button is pushed. These attributes allow authors to provide multiple submit buttons and have the form handler take a different action depending on the submit button used.</p>
<p>Some examples of <strong class=html>BUTTON</strong> follow:</p>
<p>The <strong class=html>ACCESSKEY</strong> attribute, used throughout the preceding examples, specifies a single Unicode character as a shortcut key for pressing the button. <a href="../entities/index.html">Entities</a> (<abbr title="for example"><i lang=la>e.g.</i></abbr> <strong class=html>é</strong>) may be used as the <strong class=html>ACCESSKEY</strong> value.</p>
<p>The boolean <strong class=html>DISABLED</strong> attribute makes the <strong class=html>BUTTON</strong> element unavailable. The user is unable to push the button, the button cannot receive focus, and the button is skipped when navigating the document by tabbing.</p>
<p>The <strong class=html>TABINDEX</strong> attribute specifies a number between 0 and 32767 to indicate the tabbing order of the button. A <strong class=html>BUTTON</strong> element with <strong class=html>TABINDEX=0</strong> or no <strong class=html>TABINDEX</strong> attribute will be visited after any elements with a positive <strong class=html>TABINDEX</strong>. Among positive <strong class=html>TABINDEX</strong> values, the lower number receives focus first. In the case of a tie, the element appearing first in the <abbr class=initialism title="HyperText Markup Language">HTML</abbr> document takes precedence.</p>
<p>The <strong class=html>BUTTON</strong> element also takes a number of attributes to specify client-side scripting actions for various events. In addition to the <a href="../attrs.html#events">core events</a> common to most elements, <strong class=html>BUTTON</strong> accepts the following event attributes:</p>
<ul>
<li><strong class=html>ONFOCUS</strong>, when the element receives focus;</li>
<li><strong class=html>ONBLUR</strong>, when the element loses focus.</li>
</ul>
<h2>More Information</h2>
<ul>
<li><a href="http://www.w3.org/TR/REC-html40/interact/forms.html#edef-BUTTON">BUTTON in <abbr class=initialism title="World Wide Web Consortium">W3C</abbr> HTMLá4.0 Recommendation</a></li>
</ul>
<div class=footer>
<address>Maintained by <a href="http://www.htmlhelp.com/%7Eliam/">Liam Quinn</a> <<a href="mailto:liam@htmlhelp.com">liam@htmlhelp.com</a>></address>