js/제이쿼리

this 해당 객체

멋진 개구리 2021. 9. 15. 15:45
반응형
$(document).on('click', '.btn-print', function(e) {  

window.open('${urlRootPath}/ubi4/ubihtml.jsp?jrf=attendance\_print\_1.jrf&arg=ecsIdx%23'   
+ $(this).parents('tr').find('input\[name="ecsIdx"\]').val() +   
'%23year%23' + $(this).parents('tr').find('input\[name="classOpenYear"\]').val() +   
'%23semester%23'+ $(this).parents('tr').find('input\[name="openSemester"\]').val()  
, 'printWind', 'width:1024,height:768');  
});

클릭한 해당 객체 tr에서 find하는 방법

반응형