在一种方法中,我在其中定义了一个onclick函数,从而定义了HTML。当用户单击该链接时,它将作为参数传递数组
html += '<div class="" ><a onclick=showComments(comment)>View Comments</a>'
html += '<div class="" ><a onclick=showComments(\"comment\")>View Comments</a>'
在上面的代码中,如何调用show-comments()方法。我尝试了所有可能性。有谁可以帮助我吗。我花了三个小时。
如何将数组对象作为参数传递给javascript。是否可以传递参数器