Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>form</title>
</head>
<body>
  <form action="#">
  <input type="text" name="name" id="inputField" placeholder="John" />
  <input type="submit" value="Submit" id="btn" onclick="myFunction(this.form)"/>
</form>
</body>
</html>
 
function myFunction(formParameter) {
  console.log(formParameter["name"].value);
}
Output 300px

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

Dismiss x
public
Bin info
anonymouspro
0viewers