Page 318 - Nodejs 교과서 개정2판
P. 318

</head>
           		<body>
           				<div>
           						<form	id="user-form">
           								<fieldset>
           										<legend>사용자	등록</legend>
           										<div><input	id="username"	type="text"	placeholder="이름"></div>
           										<div><input	id="age"	type="number"	placeholder="나이"></div>
           										<div><input	id="married"	type="checkbox"><label	for="married">결혼여부</label></div>
           										<button	type="submit">등록</button>
           								</fieldset>
           						</form>
           				</div>
           				<br>
           				<table	id="user-list">
           						<thead>
           						<tr>
           								<th>아이디</th>
           								<th>이름</th>
           								<th>나이</th>
           								<th>결혼여부</th>
           						</tr>
           						</thead>
           						<tbody>
           								{%	for	user	in	users	%}
           								<tr>
           										<td>{{user.id}}</td>
           										<td>{{user.name}}</td>
           										<td>{{user.age}}</td>
           										<td>{{	'기혼'	if	user.married	else	'미혼'}}</td>
           								</tr>
           								{%	endfor	%}
           						</tbody>
           				</table>
           				<br>
           				<div>
           						<form	id="comment-form">
           								<fieldset>
           										<legend>댓글	등록</legend>
           										<div><input	id="userid"	type="text"	placeholder="사용자	아이디"></div>
           										<div><input	id="comment"	type="text"	placeholder="댓글"></div>
           										<button	type="submit">등록</button>
           								</fieldset>
           						</form>
           				</div>
   313   314   315   316   317   318   319   320   321   322   323