0

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

Paolo Mossini
  • 1,064
  • 2
  • 15
  • 23
uma raja
  • 1,023
  • 1
  • 7
  • 9

0 Answers0