問題 phpはURL文字列を部分ごとに分割してくれる関数がありますよね。Javascriptでも簡単にできますか? parse_url — URL を解釈し、その構成要素を返す example <?php $url = 'https://www.softel.co.jp:8080/blogs/tech/wp-admin/post.php?post=3419&action=edit#abcdefg'; print_r(parse_url($url)); ?> Array ( [scheme] => https [host] => www.softel.co.jp [port] => 8080 [path] => /blogs/tech/wp-admin/post.php [query] => post=3419&action=edit [fragment] => abcdefg ) ↑ と似