chat.ejs 974 Bytes
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>가수와 작곡가의 만남 - 채팅</title>
    <link rel="stylesheet" href="/css/chat.css">
    <script src="/socket.io/socket.io.js"></script>
    <script src="/js/chat.js"></script>
    <link href="../css/styles.css" rel="stylesheet" />
    <script type="text/javascript" src="/node_modules/jquery/dist/jquery.js"></script>
    <script type="text/javascript">
        var text = $("#test").val();

        if (text.replace(/\s| /gi, "").length == 0){
            alert("내용을 입력해주세요.");
            $("#test").focus();
        }
    </script>
  </head>
  <body bgcolor="#B2C7D9">
    <div id="main">
      <div id="chat">
        <!-- 채팅 메시지 영역 -->
      </div>
      <div id = "input">
        <input onkeyup="enterkey()" class = "form-control" type="text" id="test" placeholder="메시지를 입력해주세요.." required/>
      </div>
    </div>
  </body>
</html>