-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path3.html_basic(2).html
More file actions
94 lines (81 loc) · 3.39 KB
/
Copy path3.html_basic(2).html
File metadata and controls
94 lines (81 loc) · 3.39 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>회원가입</title>
</head>
<body>
<h2>회원가입 form태그 예제</h2>
<!-- action은 제출할 서버의 url 주소를 입력한다. -->
<!-- form의 기본 text만 담겨있을 경우에은 application/x-www-form-unlencoded -->
<!-- form에 파일까지 포함되어 있는 경우에는 multipart/form-data -->
<form action="https://naver.com" method="post" enctype="multipart/form-data">
<div>
<!-- label의 for는 input의 id를 찾아 매핑. -->
<label for="userName">이름</label>
<!-- input의 name속성은 필수, 이 속성은 데이터가 서버로 전송될 때 각 항목을 식별하는데 사용. -->
<!-- size는 input박스의 크기. maxlength는 input박스 안의 글자수를 의미 -->
<input type="text" id="userName" name="name" size="10" maxlength="10">
</div>
<div>
<label for="email">email</label>
<input type="email"id='email' name="email" size="10" maxlength="20">
</div>
<div>
<label>주소</label>
<!-- readonly는 수정은 못하지만 서버로 전송. disabled는 수정도 못하고 서버로 전송x -->
<!-- value는 default값 설정 -->
<input type="text" name="address" size="10" maxlength="20" value="서울시 신대방동" disabled>
</div>
<div>
<label>비밀번호</label>
<input type="password" name="password" size="10" maxlength="20">
</div>
<div>
<label>성별</label>
<!-- radio 버튼은 선택지중 택1 -->
<input type="radio" name="gender" value="male">남성
<input type="radio" name="gender" value="female">여성
</div>
<div>
<label>최애</label>
<input type="checkbox" name = "good" value="karina">카리나
<input type="checkbox" name ="good" value="winter">윈터
<input type="checkbox" name = "good" value="ningning">닝닝
</div>
<div>
<label>생년월일</label>
<input type="datetime-local" name="birthday">
</div>
<div>
<label>나이</label>
<input type="number" name="age">
</div>
<div>
<label>유저선택</label>
<select name="userInfo">
<option value="guest">방문자</option>
<option value="user">일반유저</option>
<option value="admin">관리자</option>
</select>
</div>
<div>
<label>증명사진업로드</label>
<input type="file" name = "myphoto" accept="image/*">
</div>
<div>
<label>자기소개</label><br>
<textarea name="resume" rows="5" cols="30" placeholder="자기소개를 여기에 써주세용"></textarea>
</div>
<div>
<input type="submit" value="회원가입 완료">
</div>
<!--
input, button 둘 다 submit으로 같은 기능을 하지만,
button태그에 디자인적 다양성이 있어, 더 많이 활용한다.
-->
<button type="submit">회원가입 완료(버튼)</button>
</form>
</body>
</html>