d="myform" action='#'>
    <input id="input" type="text" style="width: 50%" value="message" />
    <div><input id="submit" type="submit" value="Send" /> <div>
  </form>
  
  <ul id="messages"></ul>
  
  <script>
    document.addEventListener("DOMContentLoaded", function(event) {
	const  msgs = document.getElementById("messages");
	const input = document.getElementById("input");
	const form = document.getElementById("myform");
        if (!window.WebSocket) {
            if (window.MozWebSocket) {
          