I have created a simple login form, and want to run a js function once the form is submitted. However, nothing happens when I click submit. HTML:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>CARD GAME</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<script src="index.js"></script>
<form>
Username: <input type="text" id="htmlUsername"><br><br>
Password: <input type="password" id="htmlPassword"><br>
<input type="submit" onclick="login()">
</form>
</body>
</html>
JS:
function login(){
console.log("here")
}