2023/09/10 :: codecademy learn CSS (lesson only)
2023/09/15 :: 추가 과제
<!DOCTYPE html>
<html lang="ko">
<head>
<title>회원가입</title>
<h1>회원가입</h1>
</head>
<body>
<form>
<h3>필수 입력 정보</h3>
<label for="idid">ID</label>
<textarea id="idid" name="idid" rows="1" cols="10"></textarea>
<br>
<label for="user-password">Password: </label>
<input type="password" id="user-password" name="user-password">
<br>
<label for="email_domain">Email</label>
<input type="text" name="str_email01" id="str_email01" style="width:100px"> @
<input type="text" name="str_email02" id="str_email02" style="width:100px;" disabled value="naver.com">
<select style="width:100px;margin-right:10px" name="selectEmail" id="selectEmail">
<option value="1" selected>직접입력</option>
<option value="naver.com">naver.com</option>
<option value="hanmail.net">hanmail.net</option>
<option value="hotmail.com">google.com</option>
<option value="nate.com">nate.com</option>
</select>
<script type="text/javascript" src="<http://code.jquery.com/jquery-latest.min.js>"></script>
<script type="text/javascript">
//이메일 입력방식 선택
$('#selectEmail').change(function(){
$("#selectEmail option:selected").each(function () {
if($(this).val()== '1'){ //직접입력일 경우
$("#str_email02").val(''); //값 초기화
$("#str_email02").attr("disabled",false); //활성화
}else{ //직접입력이 아닐경우
$("#str_email02").val($(this).text()); //선택값 입력
$("#str_email02").attr("disabled",true); //비활성화
}
});
});
</script>
<br>
<br>
<h3>추가 정보</h3>
<label for="profile">프로필 사진</label>
<input id="profile" name="profile" type="file" value="profile" accept="image/png, image/jpeg">
<p>성별 :</p>
<input id="male" name="sex" type="radio" value="male">
<label for="male">남자</label>
<input id="female" name="sex" type="radio" value="female">
<label for="male">여자</label>
<br><br>
<label for="birth">생년월일 :</label>
<input type="date" id="birth" name="birth" value="birth" min="1900-01-01" max="2023-12-31" />
<p>취미</p>
<input type="checkbox" id="hobby" name="hobby" value="야구">
<label for="hobby">야구</label>
<input type="checkbox" id="hobby" name="hobby" value="농구">
<label for="hobby">농구</label>
<input type="checkbox" id="hobby" name="hobby" value="축구">
<label for="hobby">축구</label>
<br>
<input type="checkbox" id="hobby" name="hobby" value="공부">
<label for="hobby">공부</label>
<input type="checkbox" id="hobby" name="hobby" value="음악감상">
<label for="hobby">음악감상</label>
<br>
<input type="checkbox" id="hobby" name="hobby" value="기타">
<label for="hobby">기타</label>
<textarea id="etc" name="self_intro" rows="1" cols="10"> </textarea>
<br>
<br>
<label for="self_intro">자기소개</label>
<br>
<textarea id="self_intro" name="self_intro" rows="5" cols="30"></textarea>
<br><br>
<input type="submit">
</form>
</body>
</html>