JSFiddle - React, Tailwind, and code Playground

by Barry Margolin

HTML

<form>
    <p>Full Name</p><br><input name="fname" type="text" placeholder="Full Name"><br>
    <p>Address</p><input name="address" type="text" placeholder="Address"><br>
    <p>Email</p><br><input name="email" type="email" placeholder="Email" ><br>
    <input type="submit"> <input type="reset" onclick="return confirm_reset();">
</form>

JavaScript

function confirm_reset() {
    return confirm("Are you sure you want to reset all text?");
}