-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunction_4.html
More file actions
33 lines (30 loc) · 874 Bytes
/
function_4.html
File metadata and controls
33 lines (30 loc) · 874 Bytes
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
31
32
33
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script>
var rightId = "chosun";
var rightPw = "chosun";
function login(id,pw){
if(id == rightId){
if(pw == rightPw){
document.write(id + "님 방문을 환영합니다");
}
else{
alert("잘못된 비밀번호입니다.");
}
}
else{
alert("존재하지 않는 아이디입니다.");
}
}
var userId = prompt("아이디를 입력하세요.","");
var userPw = prompt("비밀번호를 입력하세요","");
login(userId,userPw);
</script>
</head>
<body>
</body>
</html>