write.html
페이지 정보

본문
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="~{include/layout.html}">
<body>
<div layout:fragment="content">
<script>
function gogo(){
var imgFile = $('#file1').val();
var fileForm = /(.*?)\.(jpg|jpeg|png|gif|bmp|pdf)$/;
if(imgFile == ""){
alert("이미지를 첨부하세요.");
return false;
}
if(!imgFile.match(fileForm)) {
alert("이미지 파일만 업로드 가능");
return false;
}
}
</script>
<br>
<center>
<h1>게시판</h1>
<form method="post" enctype="multipart/form-data" onsubmit="return gogo()">
<table width=700 border=1>
<tr>
<td>제목</td>
<td><input name="title"></td>
</tr>
<tr>
<td>내용</td>
<td><textarea name="contents"></textarea></td>
</tr>
<tr>
<td>첨부 1</td>
<td><input type="file" id="file1" name="file1"></td>
</tr>
<tr>
<td>첨부 2</td>
<td><input type="file" id="file2" name="file2"></td>
</tr>
<tr>
<td></td>
<td><button>글쓰기</button></td>
</tr>
</table>
</form>
</center>
<br>
</div>
</body>
</html>
- 이전글▲ no.jpg 추가 24.06.12
- 다음글== 공란 == 24.06.12
댓글목록
등록된 댓글이 없습니다.