I originally used window.location.href=url
to jump to relevant pages, but in some third-party app, I found that it didn"t seem to work. Looking at other people"s code, he first created a hidden a tag, and then gave the a tag a click event to perform the jump:
var a = document.createElement("a");
a.setAttribute("href", aV);
a.style.display = "none";
var ev = document.createEvent("HTMLEvents");
ev.initEvent("click", false, true);
a.dispatchEvent(ev);
so what"s the difference between a location.href jump and setting a click event for a tag?