Skip to content

Commit

Permalink
Merge pull request #150 from Just-Moh-it/patch-1
Browse files Browse the repository at this point in the history
Add enter key on demo page
  • Loading branch information
mawerty authored Jan 12, 2024
2 parents 4e2adf9 + 0bda395 commit 38223d9
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,16 @@
<main class="container">
<h1>Is Prime</h1>
<p>Is Prime is an efficient algorithm that determines whether or not a given number is prime, with 95% accuracy in constant time (O(1)).</p>
<form>
<input
type="text"
id="is_prime"
placeholder="Insert your number here"
aria-label="Insert your number here"
required>
<button type="button" onclick="checkPrime()">Check</button>
<form onsubmit="event.preventDefault(); checkPrime();">
<input
type="text"
id="is_prime"
placeholder="Insert your number here"
aria-label="Insert your number here"
required>
<button type="submit">Check</button>
</form>

<div id="result">Result: </div>
<hr>
<div>
Expand Down Expand Up @@ -81,4 +82,4 @@ <h2>More cases</h2>
}
</script>
</body>
</html>
</html>

0 comments on commit 38223d9

Please sign in to comment.