JSFiddle - React, Tailwind, and code Playground

HTML

<h1> Application Form </h1>
<form id="frm1">
            <!-----Application Table ---->
<table cellpadding="8">
<tr>
                 <td>Name</td>
                 <td><input type="text" id="txtName" size=30 value=" "></td>
           </tr>

<tr>
                 <td> Address</td>
                 <td><input type="text" id="txtAdd" size=30 value=" "></td>
           </tr> 

<tr>
                 <td>Gender</td>
                 <td><input type="radio" name="sex" value="M"> Male
                         <input type="radio" name="sex" value="F"> Female </td>
</tr>

<tr>
                  <td>Stream </td>
                  <td><select name="stream">
      <option id="0" value="0">---Select stream---</option>
      <option id="1" value="se">SE</option>
                  <option id="2" value="isbm">ISBM</option>
                  </select><br  /> </td>
</tr>

<tr>
      <td>Modules</td>
      <td><input type="checkbox" name="module" value="m1"> M1
                          <input type="checkbox" name="module" value="m2"> M2
              <input type="checkbox" name="module" value="m3"> M3
                          <input type="checkbox" name="module" value="m4"> M4 

</td>
</tr>

            <tr>
     <td><input type="button" name="submit" value="OK" onclick="clickOk()">
                         <input type="reset" name="reset" value="Clear" ></td>
           </tr>



</table>
</form>
       <div id="display"></div>

JavaScript

function clickOk(){

  if(document.getElementById("txtName").value!=" "){

              if(document.getElementById("txtAdd").value!=" "){

                   var nam=document.getElementById("txtName").value;
                   var add=document.getElementById("txtAdd").value;

              document.getElementById("display").innerHTML='<hr>Hi ' 
             +nam+'<br>Address: '+add;
                        }

              else 
                   alert("Please enter your Address");
              }

else 
         alert("Please enter your Name");
}