I created some label tag with JavaScript something like this:
var labelTag = document.createElement("label");
labelTag.id = i;
labelTag.className ="myrows";
labelTag.innerHTML = data[1];
It's ok, but I need to add onlick attribute to this label too.
So I need to look the result something like this:
<label id='0' class='myrows' onclick=myfunction('first','second',..)> some info here</label>
I try with this: labelTag.onclick=myfunction('first',second,...);
No code error, but after I run the page on browser and see the source this attribute is missing. What's wrong?