JSFiddle - React, Tailwind, and code Playground

by Luke Arrington

HTML

<div id="modal">
    <div class="modalcontent">
         <p>  <form method="POST" action="https://formspree.io/[email protected]">
  <a><span id="demo"></span>Nationwide</a>
  <br>
  <input type="email" name="email" placeholder="Your email">
  <br>
  <input type="hidden" value="nationwide_information" name="triggered by component" />
  <textarea name="message" placeholder="Your message"></textarea>
  <br>
  <button type="submit">Send</button>
</form>
</p>
    </div>
</div>

CSS

#modal {
 position:absolute;
    bottom:0;
    right:0;
    background-color: #005691;
    width: 40%;
    border-width: 10px;
    }
    .modalcontent
    {
      padding: 10px;
      margin: 10px;
    }

JavaScript

window.onload = function () {
    document.getElementById('button').onclick = function () {
        document.getElementById('modal').style.display = "none"
    };
};

function myFunction() {
    var str = window.location.href;
    var n = str.includes("net");
    document.getElementById("demo").innerHTML = "Something"";
}