1
Answer

Onclick property to img created inside JavaScript function

Mohith Kovela

Mohith Kovela

7y
249
1
cell3.innerHTML = "<img src = 'Edit-icon.png' height='20' width='20' onClick = 'passValuesToInput("+id+");'>";
 
What is wrong with this line of code? Why the function is not being called and parameer is not being passed? 
Answers (1)