JS에게 jQuery를 데이터 테이블에 매개 변수를 전달아약스의 사용자 정의 버튼을
내가 Ajax.I에 새로운 내가 작업을 선택할 수 있도록 버튼에 매개 변수를 전달해야의 RoR app.I에 대한 jQuery를 데이터 테이블을 한거야 버튼을 클릭 할 때 수행 할 작업.
var invoiceTable = $('#invoice_list_index').DataTable({
"scrollY": "300px",
"bScrollCollapse": true,
processing: true,
serverSide: true,
dom: 'Bfrtip',
buttons: [
{
extend: 'alert',
text: 'My button 1',
},
{
extend: 'alert',
text: 'My button 2'
},
{
extend: 'alert',
text: 'My button 3'
}
],
"ajax": {
type: "POST",
url: '/invoices/invoice_index_page',
}
});
<a class="dt-button buttons-alert" tabindex="0" aria-controls="invoice_list_index" href="#"><span>My button 1</span></a>
문제는 내가 아약스 사용자 정의 버튼에 매개 변수를 전달하는 방법을 모르는 것입니다.
이 버튼 액션에 전달할 매개 변수는 무엇입니까? 테이블 행 데이터 또는 다른 데이터입니까? –