이 입력 필드가 있습니다.
<input type="submit" name="rregjistro" value="Rregjistro Tani Te Dhenat" onclick="openmodal()" >
먼저 PHP에서 POST 스크립트를 실행하고 자바 스크립트 기능을 사용하여 모달 팝업을 열고 싶습니다.
저를 도와주세요! 미리 감사드립니다!
양식 제출은 클라이언트 측, 즉 브라우저에서 수행되는 작업이므로 PHP를 사용하여 클릭 할 수 없습니다. 이와 같은 브라우저의 이벤트는 자바 스크립트 또는 기타 클라이언트 언어로 실행할 수 있습니다.
<form ... >
<input type="submit" name="rregjistro" value="Rregjistro" />
<!-- remove onclick attribute for now -->
</form>
<div id="myResult"></div>
<script>
$(function(){
$("input[name=rregjistro]").click(function(){
// url needs to belong to your domain
$.ajax({url: "/your_url_path", success: function(result){
$("#myResult").html(result);
open();
}});
});
});
</script>
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다