I have a problem with my code, this is my code
value id,urlIMG,NewImg[] is global
var srcArray = new Array();
for(var i=0;i<num_new_data;i++)
{
srcArray.push(urlIMG+NewImg[i]);
Show_Img += '<div class="col-xs-4 col-sm-5cols" id="s_img_click_'+id+i+'" onClick="Test('+id+','+i+','+srcArray+');" > <div class="thunho"> <img id="img_'+id+i+'" src="'+urlIMG+NewImg[i]+'" /></div></div>';
count ++;
}
function Test(id,i,srcArray )
{
//Something
}
When i'm run it, it show error:
profile.html:1 Uncaught SyntaxError: missing ) after argument list
When i remove srcArray like onClick="Test('+id+','+i+');"
it's working.
Please help me, thank you!