I want transfer value from one JavaScript to another JavaScript file when click on image where I have set attribute onclick
. On the attribute I have set function where selected image is click, I will go to another PHP or HTML file, also it carry the value to another file.
Sorry for bad grammar.
last.setAttribute('onclick', 'imgClick(this)')
display.appendChild(last);
function imgClick(img) {
location.replace("../view/packagedetails.php");
}