index.html 978 B

12345678910111213141516171819202122232425262728293031323334
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  7. <link rel="stylesheet" href="styles.css" />
  8. <title>JavaScript Promises 2 part</title>
  9. </head>
  10. <body>
  11. <div id="myForm">
  12. <h1 class="title">Chat</h1>
  13. <div>
  14. <label for="nickname">Your nickname:</label>
  15. <input
  16. id="nickname"
  17. type="text"
  18. placeholder="nickname"
  19. maxlength="14"
  20. value="surstrommed"
  21. />
  22. <br />
  23. <span>Your message:</span><br />
  24. <textarea id="message" placeholder="Write a message"></textarea>
  25. <br />
  26. <div id="errorBox"></div>
  27. <button id="sendBtn">Send</button>
  28. </div>
  29. <h2>Messages:</h2>
  30. <div class="history" id="historyChat"></div>
  31. </div>
  32. <script src="index.js"></script>
  33. </body>
  34. </html>