JS

버튼으로 서브밋을 처리하는방법

brilliant-growth 2023. 7. 10. 10:18
	$("input[value='제출하기']").on("click",function(){
            
                document.frm.method="get";
                document.frm.action="approvalFormOk.jsp";
                document.frm.submit();
            })

name이 frm으로 스크립트하고 html이 똑같아야함

<form action="approvalFormOk.jsp" name="frm" method="get">

	<input class="btn btn-primary" type="button" value="제출하기" />

</form>