Call function javascript on html button onclick, passing param ASP
  
 
     
     
             
                 
 
 
         
         0 
         
 
         
             
         
 
 
 
 
             
 
             
 
     
     
 
 I'm using node, i passed a param like this:   res.render('page.ejs',{"product" : product });    product is JSON.   In page.ejs  I have to call a javascript function passing product like parameter: <button onClick='add(<%product%>)' > add </button>   But,in add function, prodotto is undefined.  How could i do?   Thanks      
 
         
             
                 javascript html asp.net node.js 
             
         
 
     
         
             
  share | improve this question  
             
 
             
 
     
         asked Nov 20 '18 at 11:47 
     
     
         
     
     
         afohr afohr 
         
             6 3 
         
     
 
 
             
         
     
     
 
                 
     
 	    
              
 
         
 
    ...