onsubmit event not working if in the form is a input with confirm name or id .
if i add below input to the form the onsubmit event not working
<input type="checkbox" name="confirm" id="confirm">
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<form action="/" method="post" onsubmit="return confirm('Are you sure ?')">
<input type="text" name="name">
<br>
<input type="checkbox" name="confirm" id="confirm">
<button type="submit">submit</button>
</form>
</body>
</html>
when i removed the input with confirm name the onsubmit event work!!!