submit form code example

Example 1: html submit button

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

Example 2: html input types

<form>
  <input type="button">
  <input type="checkbox">
  <input type="color">
  <input type="date">
  <input type="datetime-local">
  <input type="email">
  <input type="file">
  <input type="hidden">
  <input type="image">
  <input type="month">
  <input type="number">
  <input type="password">
  <input type="radio">
  <input type="range">
  <input type="reset">
  <input type="search">
  <input type="submit">
  <input type="tel">
  <input type="text">
  <input type="time">
  <input type="url">
  <input type="week">
</form>

Example 3: posting with forms html

<form method="POST" action="INSERT WHERE YOU'RE SENDING THE DATA TO HERE">
	<input type="text" name="INSERT DATA KEY NAME HERE"> <!-- You don't have to have this line --> 
</form>

Example 4: javascript submit a form

document.getElementById("myFormID").submit();

Example 5: intput field submit button

<label for="fname">First name:</label><br>
  <input type="text" id="fname" name="fname"><br>

Example 6: forms in html

<html>
<form action= "your site" method = "post/get">
  </form>
</html>

Tags:

Misc Example