JSFiddle - React, Tailwind, and code Playground

by skwjdgn

HTML

아이디:<input type="text"id="userId"> 
 비밀번호: <input type="password"  id="password">
<button id="joinBtn" onclick="join();">가입</button>

JavaScript

function join(){
	var id = document.getElementById('userId').value;
  var password = document.getElementById('password').value;
  
  if(id == "" || id == null){
  	alert("아이디를 입력해주세요~");
  }
  
  ajax
}