javascript - js: How navigate to new url and get callBack when page is loaded? -
i trying implement js function navigates 3rd party url , call function once page loaded;
document.location = "http://ww.example.com"; window.onload = function () { alert('example.com page loaded!") }
can done ?
you can't.
the execution environment first page destroyed before 1 new page created. cannot interact.
the closest come pass data (through url / cookie / local storage) other page in script runs on it.
Comments
Post a Comment