input in button code example

Example 1: input type button

<input type="button" value="Button content...">

Example 2: type button on form

<form action="/button-type">
<button type="button" onclick="alert('This button does nothing.')">Click me for no reason!</button><br><br>
<label for="name">Name</label><br>
<input name="name"><br><br>
<button type="reset">Reset the form!</button><br><br>
<button type="submit" disabled>Submit (disabled)</button>
</form>

Example 3: type button on form

<form action="/button-type">
<button type="button" onclick="alert('This button does nothing.')">Click me for no reason!</button><br><br>
<label for="name">Name</label><br>
<input name="name"><br><br>
<button type="reset">Reset the form!</button><br><br>
<button type="submit">Submit (disabled)</button>
</form>