<form id="form">
        <input type="text" />
        <input type="reset" value="Reset"/>
    </form>
        input {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%,-50%);
            transition: 2s;
            border: 2px solid #be3d3d;
            border-radius: 20px;
            text-indent: 10px;
            font-family: Verdana;
            outline: none;
            padding: 5px;
        }
            input[type="reset"] {
                margin-left: 100px;
                background: #be3d3d;
                color:#fff
            }

        document.getElementById("form").onreset = function () {
            message();
        };

        function message() {
            alert("the text you entered has been deleted")
        }
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.