I want to call a function when the user submit a form, and how to achieve this with external JS script.
index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>teste</title>
<link rel="stylesheet" type="text/css" href="style.css">
<link type="text/javascript" src="main.js">
</head>
<body>
<h1 class="title">teste</h1>
<form action="a()">
<input type="input1" class="input1" name="verb" id="verb" placeholder="Verb"/>
</form>
</body>
</html>
main.js
function a(){
alert("verb");
}