I created a small table where users can input product names and numbers. My question is, how can I notify the user if they try to leave the page without saving the entered information?
<form action="index.php" method="post">
<input type="text" name="pnumber" value="" placeholder="Product Number...."/>
<input type="text" name="pname" placeholder="Product Name...." /> <br>
<button id="save">save</button>
</form>