jQuery로 클릭 확인을 바인딩하려고합니다 (JSF 페이지의 코드 정리). jQuery click() 이벤트 전에 MyFaces로 작성된 onclick 인라인 함수 (oamSubmitForm();)가 실행된다는 것을 알고 있습니다. 이전에 jQuery 클릭을 할 수 있습니까? 당신은 내기 가장 좋은 것JSF <h : commandLink> 또는 <h : commandButton> 액션이 수행되기 전에 jQuery click() 이벤트를 어떻게 실행할 수 있습니까?
jQuery(".commandButtonConfirmDelete").click(function() {
var answer = confirm('Confirm Delete?');
return answer;
});
<h:commandLink styleClass="commandButtonConfirmDelete" />
<h:commandButton styleClass="commandButtonConfirmDelete" />