How to pass whats inside of tag with myClass class as a string here?
function przyciskRozpoczynajacyEdycje() {
var items = document.getElementsByClassName('myClass');
for (var i=0;i<items.length;i++) {
items[i].addEventListener("click", function () { passIdToEdit('How to put here whats inside tag with class "myClass"?') });
}
}
Did you try
this.innerHTML? Inside an event handlerthisis the associated object of the event, in this case the HTML element: