-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathex10form.html
75 lines (64 loc) · 2.39 KB
/
ex10form.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
</head>
<body>
<!-- 여기서부터 데이터를 넘길 공간을 만들어주자! (form)
속성값
1. name : 입력한 값을 구분하기 위해 이름 지정
2. placeholder : 미리보기 텍스트
3. autofocus : 자동 커서 설정
4. maxlength : 글자 수 제한 지정
5. value : 기본 값 지정
6. readonly : 읽기 전용 지정
-->
<form action="#" method="get">
<p>일반 텍스트를 작성하는 공간</p>
ID : <input type="text" name = "id" placeholder="아이디를 입력해주세요." autofocus/>
<br>
PW : <input type="password" name="pw" maxlength="10"/>
<br>
주소 : <input type="text" name = "add" value="광주" readonly/>
<!-- 체크 checkbox, radio
이 두가지 타입은 무조건 name, value를 설정해줘야한다.
(1) checkbox 중복이 가능
(2) radio 중복이 불가
-->
<br><br>
<p>좋아하는 커피 메뉴를 모두 골라주세요.</p>
아메리카노 <input type="checkbox" name="coffee" value="AME"/>
카페라떼 <input type="checkbox" name="coffee" value="latte"/>
<br><br>
<p>성별을 골라주세요</p>
남자<input type="radio" name="gender" value="남자"/>
여자<input type="radio" name="gender" value="여자"/>
<!-- 선택 select -->
<select>
<option value="네이버">네이버</option>
<option value="다음">다음</option>
<option value="구글">구글</option>
</select>
<!-- 업로드부터 날짜까지는 구글링해도 됨 -->
<!-- 파일 업로드 시 -->
<input type="file"/>
<!-- 색을 지정할 시 -->
<input type="color"/>
<!-- 수치를 입력할 때 -->
<input type="number"/>
<!-- 범위를 입력할 때 -->
<input type="range"/>
<!-- 날짜를 입력할 때 -->
<input type="date"/>
<!-- 중요!!! -->
<br/><br/>
<!-- 제출할 때 -->
<input type="submit" value="보내기"/>
<!-- 초기화 버튼 -->
<input type="reset" value="다시 작성"/>
</form>
</body>
</html>