Search code examples
htmlbuttonpopupwindow

How to close a popup window, when clicking onto a button in html only


I have been trying to use pure HTML on my page because I do not know jQuery and am very unfamiliar with JavaScript.

Is there a way to close a popup window with pure HTML?

<td colspan="4">
  <div align="center">
    <label>
      <input type="checkbox" name="checkbox" value="checkbox">I Agree To The Terms & Conditions</label>
  </div>
</td>
</tr>
<tr>
  <td width="27%" height="28">
    <div align="center">
      <label></label>
    </div>
  </td>
  <td width="22%">
    <form action="LLH.html">
      <div align="right">
        <input type="submit" value="Agree">
      </div>
    </form>
  </td>
  <td width="21%">
    <div align="left">
      <form action="master.destroy(Terms.html)">
        <input type="submit" value="Do Not Agree">
      </form>
    </div>
  </td>
  <td width="30%">&nbsp;</td>


Solution

  • <input type="button" value="Close this window" onclick="self.close()">
    

    In the body, does that help?