— I wanna set document.getElementById('delete_pk').value
to data-pk
value
— With this code its said e.element is undefined
— How to get the element triggered?
— Well, get a reference to that element?
— Document.getElementById(#yourId).getAttribute('data-pk')
— I have so many button so i cant do this 😕
— document.querySelector('button.btn.btn-danger.btn-xs.editor_remove');
— If you don't want that long string, just create an ID per button
— Or traverse the DOM tree based on the location of the other button you click on