../../memo.html?id=1../../memo.html?id=1&name=memovar urlParam = location.search;substring(1) や split("=" or "&") で変数名と値を分離して利用できる ../../memo.html#memovar urlHash = location.hash;memo.html?parameter#hash 〇memo.html#hash?parameter × ←全てアンカーとして認識されてしまう
parent.htmlのコード
child.htmlのコード
jsファイルのコード
参考になったサイト
JavaScriptでURLのパラメータやアンカーを判断して処理を変更する方法