Q:

Uncaught SyntaxError: Unexpected token , pass multiple variables to javascript function

I want to add button to div of "abc".  When the button is pressed, it will pass multiple variables to javascript function. 
document.getElementById("abc").innerHTML = 
"<button type='button' class='button3' onclick='delete_post(" +   
para1 + "," + para2 +")'>delete</button>";

The error of Uncaught SyntaxError: Unexpected token , appears.  
I pass multiple variables to javascript function like 
"<button ... onclick='delete_post(" + para1 + "," + para2 +")' ... >";

How can I pass multiple variables to javascript function? 

Solution:
"<button ... onclick='delete_post(\"" + para1 + "\",\"" + para2 +"\")' ... >";

Quote the js variables with \" around them. 

A:

Since para1 and para2 are strings you have to wrap it inside quotes before passing those as parameters,
".. onclick='delete_post(\"" + para1 + "\",\"" + para2 +"\")'>delete</button>";

