Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
  
  <form action="">
    <div>
      <label for="username"> Username </label>
      <input type="text" id="username" name="username">
     </div>
     <div>
      <label for="password"> Password </label>
      <input type="password" id="password" name="password">
    </div>
     <div>
      <label for="age"> Age </label>
      <input type="number" id="age" name="age">
    </div>
    <div>
      <label for="polictically_exposed"> Are you a politically exposed individual </label>
      <fieldset id="polictically_exposed">
        <input type="radio" value="true" name="polictically_exposed"> Yes
        <input type="radio" value="false" name="polictically_exposed"> No
      </fieldset>
    </div>
     <div>
      <label for="terms"> Accept terms and conditions </label>
      <input type="checkbox" id="terms" name="terms" value="on">
    </div>
     <div>
      <button type="submit"> Submit </button>
    </div>
</form>
</body>
</html>
 
const form = document.querySelector('form')
form.onsubmit = function (event) {
  const data = new FormData(form);
  for (let entry of data.entries()) {
    console.log(entry)
  }
  return event.preventDefault();
}
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers