-
Notifications
You must be signed in to change notification settings - Fork 0
/
common.js
30 lines (25 loc) · 938 Bytes
/
common.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
const id = document.getElementById('id');
const pw = document.getElementById('password');
const loginbutton = document.getElementById('loginbutton');
function login() {
const id = document.getElementById('id');
const pw = document.getElementById('password');
if(id.value=="" || pw.value==""){
alert("로그인을 할 수 없습니다.")
}else{
location.href='main.html';
}
}
function create_id() {
var name = document.querySelector('#name');
var roomnum = document.querySelector('#roomnum');
var id = document.querySelector('#id');
var pw = document.querySelector('#password');
var r_pw = document.querySelector('#r_pw');
if(id.value=="" || pw.value =="" || r_pw.value==""){
alert("회원가입을 할 수 없습니다.")
}else{
if(pw.value !== r_pw.value) alert("비밀번호를 확인해주세요.");
else location.href = 'main.html';
}
}