하나의 form에 여러 submit 만들기 (formaction)
<form method="post">
<input type="sumit" formaction="[주소]">
<input type="sumit" formaction="[주소2]">
</form>
formaction 이용하여 하나의 form에 여러 submit 만들기 가능
예시
<form method="post">
<input type="hidden" name="bd_code" value="${comment.bd_code}">
<input type="hidden" name="bd_num" value="${comment.bd_num}">
<input type="hidden" name="pageNum" value="${pageNum}">
<input type="hidden" name="target_bd_cm_num" value="${comment.bd_cm_num}">
<input type="hidden" name="target_ref" value="${comment.ref}">
<input type="hidden" name="target_re_step" value="${comment.re_step}">
<input type="hidden" name="target_re_level" value="${comment.re_level}">
<tr class="tr_comment">
<td class="td_comment_content">
<c:forEach var="i" begin="0" end="${comment.re_level-1}"> </c:forEach>
<c:if test="${comment.re_level>1 }">
<span style="color:gray">ㄴ</span>
</c:if>
${comment.content}
</td>
<td>${comment.m_id}</td>
<td class="comment_reg_date"><fmt:formatDate value="${comment.reg_date}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
<td><input type="submit" value="삭제" class="btn btn_comment_delete" formaction="${pageContext.request.contextPath}/communityCommentDelete.do"></td>
</tr>
<tr>
<td class="td_comment_reply_content">
<c:forEach var="i" begin="0" end="${comment.re_level}"> </c:forEach>
<input name="content" class="form_box comment_reply_box comment_reply_box_${comment.bd_cm_num}">
<input type="button" value="답글달기" class="btn btn_reply btn_reply_${comment.bd_cm_num}" onclick="funcReplyBox(${comment.bd_cm_num}, '300px')"></input>
<input type="submit" value="등록" class="btn btn_reply btn_reply2 btn_reply2_${comment.bd_cm_num}" formaction="${pageContext.request.contextPath}/communityCommentReply.do">
</td>
<td>
</td>
</tr>
</form>
Author And Source
이 문제에 관하여(하나의 form에 여러 submit 만들기 (formaction)), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://velog.io/@ino5/하나의-form에-여러-submit-만들기-formaction저자 귀속: 원작자 정보가 원작자 URL에 포함되어 있으며 저작권은 원작자 소유입니다.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)