html button submit code example

Example 1: html submit button

<input type="submit" value="Submit">

Example 2: submit button

<button type="submit" form="form1" value="Submit">Submit</button>

Example 3: html submit button

<input type="submit">

Example 4: 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 5: 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 disabled>Submit (disabled)</button>
</form>

Tags:

Html Example