In one method I defined the HTML in that one onclick function is there. When user clicks that link it passes the array as an argument
html += '<div class="" ><a onclick=showComments(comment)>View Comments</a>'
html += '<div class="" ><a onclick=showComments(\"comment\")>View Comments</a>'
In the above code how to call the show-comments() method. I tried all the possibilities. Can someone help me, please. I spent 3 hours on this.
How to pass array object as an argument in javascript.is it possible to pass paramenters