JSFiddle - React, Tailwind, and code Playground

by Steve Mann

HTML

<p>Conference Registration Form</p>
<form id="frm1" action="form_action.asp">First name:
    <div class="container">
        <input type="text" name="fname" required>
        <br>
        <br>Last name:
        <input type="text" name="lname">
        <br>
        <br>Address:
        <input type="text" name="addr">
        <br>
        <br>Home Phone #:
        <input type="text" name="ph1">
        <br>
        <br>
    </div>
    <input type="button" onclick="submit()" value="Submit!">
    <input type="button" onclick="reset()" value="Reset">
</form>

CSS

body {
    font-family:Helvetica
}
.container {
    width: 500px;
    clear: both;
}
.container input {
    width: 100%;
    clear: both;
}

JavaScript

function submit() {
    document.getElementById("frm1").submit();

    function reset() {
        document.getElementById("frm1").reset();

    }