오늘 학원가서 수업듣다가 혹시나 톰캣 꺼져있나 보니까
아니나 다를까.... 멈춰있다....
폼 관련 태그들
<!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>
<input type="hidden" name="ie" value="utf-16">
<input name="test" value="">
<input type="reset" value="reset"> <!-- 초기화 -->
<input type="submit" name="sub" value="send"> <!-- 제출-->
<hr>
<p>size 10 : <input size="10"></p>
<p>size 20 : <input size="20"></p>
<hr>
<p>maxlength 3 : <input maxlength="3"></p> <!-- 입
력할 수 있는 길이에 제한 -->
<p>maxlength 3 : <input maxlength="6"></p>
<hr>
<p>카드 번호를 입력하세요</p>
<input type="text" size="4" maxlength="4" name="card1">
<input type="password" size="4" maxlength="4" name="card2">
<input type="password" size="4" maxlength="4" name="card3">
<input type="text" size="4" maxlength="4" name="card4">
<input type="image" src="images/login.jpg">
<hr>
<p><input type="search" name="search"></p>
<p><input type="url" name="url"></p>
<p><input type="email" name="email"></p>
<p><input type="tel" name="tel"></p>
<p><input type="number" name="number" size="4" min="10" max="20" step="2"></p>
<p><input type="range" name="range" size="4" min="10" max="20" step="2"></p>
<p><input type="date" name="date"></p>
<p><input type="time" name="time"></p>
</form>
</body>
</html>
alt + l + alt + o 누르면
http://127.0.0.1:5500/04/form1.html << url 창이 바뀌면서 실시간으로 반영됨!!
<!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>
<p>color : <input type="color" name="color" value="#006600"></p>
<hr>
<p>date : <input type="date" name="date" min="2022-02-02" max="2022-02-15"></p>
<p>month : <input type="month" name="month"></p>
<p>week : <input type="week" name="week"></p>
<hr>
<p>time : <input type="time" name="time" id="time"></p>
<p>datetime : <input type="datetime" name="datetime"></p>
<p>datetime-local : <input type="datetime-local" name="datetimeLocal" id="datetimeLocal"></p>
<a href="https://www.naver.com" id="btn1">네이버 이동</a>
<input type="button" value="click me" id="btn2">
<input type="file" name="file" accept=".jpg, .png, .gif">
<button>전송</button>
</form>
<script>
// var date = new Date();
// document.getElementById("time").value = date.getHours() + ":" + date.getMinutes();
document.getElementById("btn1").onclick = function(){
return confirm("네이버로 이동합니다.");
}
document.getElementById("btn2").onclick = function(){
alert("you click me!");
}
</script>
</body>
</html>
댓글