I currently have a function run when the calculate button is clicked.
<button class="hvr-shrink"  type="submit" value="submit" id="submit"> Calculate </button>
I want that the function runs when I not only click the submit button but also the ENTER KEY
Function works with perfection just want it to also work when user hits enter


<html>
<head>
    <title>Project</title>
    <link href="../CSS files/style.css" rel="stylesheet" type="text/css">
    <link href="../CSS files/hover.css" rel="stylesheet" type="text/css">
    <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700,800' rel='stylesheet' type='text/css'>
</head>
<body>
    <div id="home">
        <a href="home.html"> 
            <img class="hvr-shadow" src="../../misc/hoem.png" id="homeicon">
        </a>
    </div>
    <h1>Geometric Sequence</h1>
    <h2>Find any term of a Geometric Sequence</h2>
        <input id="firstTerm" placeholder="First Term?">
        <input id="nTerm" placeholder="Nth Term?">
        <input id="commonR" placeholder="Common Ratio?">
        <button class="hvr-shrink" type="submit" value="submit" id="submit"> Calculate </button>
        <p id="term"> </p>
    </div>
    <script type="text/javascript" src="../math fxn (js)/geoseq.js"></script>
<script src="https://www.gstatic.com/firebasejs/3.6.0/firebase.js"></script>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
</body>
</body>
 
     
     
    