Last active
August 29, 2015 14:12
-
-
Save oldj/d1bf6f40b7febd6498c5 to your computer and use it in GitHub Desktop.
Revisions
-
oldj revised this gist
Jan 7, 2015 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,10 +4,10 @@ */ function gotoUrl(url) { if (!document.attachEvent) { //define for none-IE browsers location.href = url; } else { //define for IE var refer_link = document.createElement("a"); refer_link.href = url; document.body.appendChild(refer_link); -
oldj created this gist
Jan 7, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ /** * goto URL without losting refer * @see http://oldj.net/article/referrer-by-location-href-in-ie/ */ function gotoUrl(url) { if (!document.attachEvent) { //define for all browsers location.href = url; } else { //re-define for IE var refer_link = document.createElement("a"); refer_link.href = url; document.body.appendChild(refer_link); refer_link.click(); } }