4
window.popstate
が解雇されたときに新しいページのURLを取得する方法はありますか?window.popstateで新しいURLを取得
window.onpopstate(function(){
newPageUrl = //get the new page's URL
})
window.popstate
が解雇されたときに新しいページのURLを取得する方法はありますか?window.popstateで新しいURLを取得
window.onpopstate(function(){
newPageUrl = //get the new page's URL
})
使用この
window.onpopstate(function(){
newPageUrl = location.href;
})
これは正しい構文である: window.onpopstate =関数(){ } https://で現像.mozilla.org/ja-jp/docs/Web/API/WindowEventHandlers/onpopstate – Marian07
はない 'location.href'仕事をしていますか? 。 –
window.location.href.toString()スプリット(window.location.host)[1] –