This is my code,
var baseurl = "https://localhost:8888/files/";
var mydiv = document.getElementById("myDiv");
var aTag = document.createElement('a');
aTag.setAttribute('href',"#");
aTag.setAttribute('onclick',"getFolderList(" + baseurl + ")");
aTag.innerHTML = "Home /";
mydiv.appendChild(aTag);
Here, getFolderList is the JavaScript function which accepts one parameter. I used the above code, but it does not call the function. How to pass the "baseurl" value to the getFolderList function?