Skip to content

Commit

Permalink
Add test for button inside form.
Browse files Browse the repository at this point in the history
  • Loading branch information
sanketj committed Sep 24, 2024
1 parent 2ce4a88 commit 65e8934
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions button-element/button-with-form-parent.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!DOCTYPE html>
<html>
<head>
<style>
div {
border: 2px solid black;
}
</style>
</head>
<body>
<form onsubmit="alert('hello')" id="myForm">
<button>Submit</button>
</form>
<script>
const button = document.querySelector('button');
console.log(button.type);
</script>
</body>
</html>

0 comments on commit 65e8934

Please sign in to comment.