JavaScript: Global variable in Internal script vs External script
I want to fetch an id of an element in js and store in a variable. in internal script, i used a global variable to fetch it and used it in a function. link=document.getElementById("element"); function try(){ link.onclick=function{ alert("hey); } ...