For a problem with a blank page, you should not return false , and since you are using an anonymous function with an automatic call, you can simply delete the return .
By default, when there is no return statement in the function body, they return undefined , and this will prevent navigation to a blank page.
eg:.
javascript:(function () { return false; })();
Shows a blank page containing a string representation of the return value, "false" in this case.
javascript:(function () {})();
The browser will not move.
After that I have a few comments:
The file will be loaded asynchronously, you cannot be 100% sure that jQuery will be loaded immediately after changing the element src attribute, you can use the load event of the script element ( readystatechange for IE).
I would also recommend adding a script element to head .
source share