😁 html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" href="../css/public.css" type="text/css">
<style>
pre{
background-color : skyblue;
}
</style>
</head>
<body>
<pre style="background-color : yellow;">
데이터형식 - pattern
숫자 : \d{3} \d{3,4} [0-9]+ [0-9]{3} \d\d\d
영문자 : [a-z]+(a-z까지 한글자이상) [A-Z]{5}
한글 : [ㄱ-ㅎ]+ [가-힣]{2,6}
</pre>
<form action="newattr.jsp" method="post">
<input type="text" placeholder="아이디" value="a001" disabled name="id"><br>
<input type="text" placeholder="비밀번호" name="pass"><br>
<input type="text" placeholder="010-1234-5678" pattern="(010)-[0-9]{4}-[0-9]{4}" name="tel"><br>
<input type="submit">
</form>
</body>
</html>
😁 jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<%
String sid = request.getParameter("id");
String spass = request.getParameter("pass");
String tel = request.getParameter("tel");
// out.print("<table><tr><td>아이디</td><td>" + sid + "</td></tr></table>");
%>
<table>
<tr>
<td>아이디</td>
<td><%= sid %></td>
</tr>
<tr>
<td>전화번호</td>
<td><%= tel %></td>
</tr>
</table>
</body>
</html>
😁 참고자료
😁 실행
'웹프로그래밍(HTML, CSS3, JavaScript)' 카테고리의 다른 글
[html/jsp] 의사클래스 구조 (0) | 2022.12.27 |
---|---|
[html/jsp] 의사클래스 상태 (0) | 2022.12.27 |
[HTML/jsp] file, select, button, multiple (0) | 2022.12.25 |
[HTML&Script] formtest2 (0) | 2022.12.23 |
[HTML&Script] buttonproc (0) | 2022.12.23 |