document.location.href
またはwindow.open
IE8 以下で新しいウィンドウを開く場合、IE9+、Firefox、または Chrome ではそうではありませんRequest.UrlReferrer
。null
解決策は、あなたが好きだった場所です
document.location.href = "/Roles/Index";
以下の関数をコピーして js ファイルに貼り付け、その関数を呼び出すだけです。
RedirectURL("/Roles/Index");
function RedirectURL(url) {
var a = document.createElement("a");
if (a.click) {
// HTML5 browsers and IE support click() on , early FF does not.
a.setAttribute("href", url);
a.style.display = "none";
document.body.appendChild(a);
a.click();
} else {
// Early FF can, however, use this usual method
// where IE cannot with secure links.
window.location.href = url;
}
}
上記の解決策で問題が解決することを願っています。