{"id":26999,"date":"2017-07-13T13:47:12","date_gmt":"2017-07-13T04:47:12","guid":{"rendered":"http:\/\/www.sejuku.net\/blog\/?p=26999"},"modified":"2024-05-06T11:43:52","modified_gmt":"2024-05-06T02:43:52","slug":"%e3%80%90javascript%e5%85%a5%e9%96%80%e3%80%91location%e3%82%92%e5%ae%8c%e5%85%a8%e7%90%86%e8%a7%a3%e3%81%99%e3%82%8b%e3%81%9f%e3%82%81%e3%81%ae%e3%82%b3%e3%83%843%e3%81%a4%ef%bc%81","status":"publish","type":"post","link":"https:\/\/www.sejuku.net\/blog\/26999","title":{"rendered":"JavaScript\u3067URL\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f\uff1flocation\u306e\u4f7f\u3044\u65b9\u3092\u5fb9\u5e95\u89e3\u8aac"},"content":{"rendered":"<p><div class=\"box_voice\"><b><br \/>\nURL\u306e\u60c5\u5831\u3063\u3066\u3069\u3046\u3084\u3063\u3066\u53d6\u5f97\u3059\u308b\u306e\uff1f<br \/>\nURL\u304c\u6301\u3063\u3066\u3044\u308b\u30d1\u30e9\u30e1\u30fc\u30bf\u306a\u3069\u3092\u6d3b\u7528\u3057\u305f\u3044<br \/>\nlocation\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f7f\u3044\u3053\u306a\u3057\u305f\u3044<br \/>\n<\/b><\/div><\/p>\n<p>Web\u30b5\u30a4\u30c8\u306eURL\u306fJavaScript\u304b\u3089\u53d6\u5f97\u3057\u3066\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u5236\u5fa1\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001URL\u306b\u306f\u30d1\u30e9\u30e1\u30fc\u30bf\u304c\u4ed8\u4e0e\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u3082\u3042\u308a\u3001\u3053\u308c\u3089\u306e\u30c7\u30fc\u30bf\u3092\u6d3b\u7528\u3059\u308b\u3053\u3068\u3067\u30b5\u30a4\u30c8\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u610f\u56f3\u7684\u306b\u5909\u3048\u308b\u3088\u3046\u306a\u5236\u5fa1\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3057\u304b\u3057\u3001\u3053\u308c\u3089\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u624b\u6cd5\u306b\u3064\u3044\u3066\u4e00\u4f53\u3069\u306e\u3088\u3046\u306b\u5b66\u7fd2\u3092\u9032\u3081\u3066\u3044\u3051\u3070\u826f\u3044\u306e\u304b\u60a9\u3080\u4eba\u3082\u5c11\u306a\u304f\u306a\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001\u521d\u5fc3\u8005\u3067\u3082\u4eca\u65e5\u304b\u3089location\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u6d3b\u7528\u3057\u3066URL\u3092\u53d6\u5f97\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308b\u624b\u6cd5\u306b\u3064\u3044\u3066\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3057\u3066\u3044\u304d\u307e\u3059\u306e\u3067\u3001\u305c\u3072\u6700\u5f8c\u307e\u3067\u8aad\u3093\u3067\u7406\u89e3\u3092\u6df1\u3081\u3066\u9802\u3051\u308c\u3070\u5e78\u3044\u3067\u3059\u3002<\/p>\n<p><b>\u3053\u306e\u8a18\u4e8b\u306f\u3053\u3093\u306a\u4eba\u306e\u305f\u3081\u306b\u66f8\u304d\u307e\u3057\u305f<\/b><br \/>\n<div class=\"box01\"><\/p>\n<li><b>URL\u3092JavaScript\u304b\u3089\u53d6\u5f97\u3057\u305f\u3044\u65b9<\/b><\/li>\n<li><b>URL\u306b\u542b\u307e\u308c\u3066\u3044\u308b\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u53d6\u5f97\u3057\u305f\u3044\u65b9<\/b><\/li>\n<li><b>location\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f7f\u3044\u3053\u306a\u3057\u305f\u3044\u65b9<\/b><\/li>\n<\/div>\n<h2>location\u3068\u306f\uff1f<\/h2>\n<p>location\u3068\u306f\u3001\u73fe\u5728\u8868\u793a\u3055\u308c\u3066\u3044\u308b\u30a6\u30a7\u30d6\u30da\u30fc\u30b8\u306eURL\u3092\u62bd\u51fa\u3057\u305f\u308a\u3001\u5225\u306e\u30da\u30fc\u30b8\u3078\u9077\u79fb\u3059\u308b\u5834\u5408\u306a\u3069\u306b\u4fbf\u5229\u306a\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u3059\u3002<\/p>\n<p>\u57fa\u672c\u7684\u306a\u6a5f\u80fd\u3068\u3057\u3066\u306f<b>URL\u3084\u3001\u30db\u30b9\u30c8\u540d\u30fb\u30d1\u30b9\u30fb\u30d7\u30ed\u30c8\u30b3\u30eb<\/b>\u306a\u3069\u306e\u60c5\u5831\u3092\u5f97\u308b\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\u3002\u307e\u305f\u3001location\u306b\u306f\u3055\u307e\u3056\u307e\u306a\u30d7\u30ed\u30d1\u30c6\u30a3\u304c\u63d0\u4f9b\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u8a66\u3057\u306b\u3001\u4efb\u610f\u306eweb\u30da\u30fc\u30b8\u3092\u958b\u3044\u3066\u30d6\u30e9\u30a6\u30b6\u306e\u30c7\u30d9\u30ed\u30c3\u30d1\u30fc\u30c4\u30fc\u30eb\u3092\u8d77\u52d5\u3057\u3001\u30b3\u30f3\u30bd\u30fc\u30eb\u3078location\u3068\u5165\u529b\u3057\u3066\u5b9f\u884c\u3055\u305b\u3066\u307f\u307e\u3057\u3087\u3046\u3002<br \/>\n<img decoding=\"async\" class=\"alignnone size-full wp-image-36376\" src=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/10\/javascript-location-console.jpg\" alt=\"javascript-location-console\" width=\"800\" height=\"400\" srcset=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/10\/javascript-location-console.jpg 800w, https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/10\/javascript-location-console-150x75.jpg 150w, https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/10\/javascript-location-console-300x150.jpg 300w, https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/10\/javascript-location-console-640x320.jpg 640w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><br \/>\n<div class=\"img-caption\">console\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u4e00\u89a7\u3092\u8868\u793a<\/div><\/p>\n<p>location\u306b\u63d0\u4f9b\u3055\u308c\u3066\u3044\u308b\u30d7\u30ed\u30d1\u30c6\u30a3\u304c\u305a\u3089\u3063\u3068\u4e26\u3073\u307e\u3059\u306d\u3002\u3053\u308c\u3089\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u304c\u793a\u3057\u3066\u3044\u308bURL\u60c5\u5831\u306f\u3001\u73fe\u5728\u958b\u3044\u3066\u3044\u308bWeb\u30da\u30fc\u30b8\u306b\u57fa\u3065\u3044\u305f\u3082\u306e\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3092location\u306e\u8a18\u8ff0\u306e\u5f8c\u308d\u306b\u3064\u3051\u308b\u3053\u3068\u3067\u3001\u30d4\u30f3\u30dd\u30a4\u30f3\u30c8\u3067\u6b32\u3057\u3044\u5024\u3092\u30b2\u30c3\u30c8\u3067\u304d\u308b\u306e\u3067\u3059\u3002<\/p>\n<h3>location\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3068\u30e1\u30bd\u30c3\u30c9\u4e00\u89a7<\/h3>\n<p>\u3067\u306f\u65e9\u901f\u3001location\u306e\u4f7f\u3044\u65b9\u3092\u78ba\u8a8d\u3057\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>location\u306f\u57fa\u672c\u7684\u306b\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306b\u5f8c\u308d\u306b\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u7d44\u307f\u5408\u308f\u305b\u3066\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:js decode:true\">location.href\r\n<\/pre>\n<p>\u3053\u306e\u4f8b\u306e\u5834\u5408\u306f\u3001\u73fe\u5728\u958b\u3044\u3066\u3044\u308b\u30da\u30fc\u30b8\u306eURL\u3092\u53d6\u5f97\u3059\u308b\u3068\u3044\u3046\u8a18\u8ff0\u306b\u306a\u308a\u307e\u3059\u3002\u3053\u308c\u3092\u5909\u6570\u306b\u5165\u308c\u305f\u308a\u3057\u3066\u64cd\u4f5c\u3092\u884c\u306a\u3063\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p>\u3067\u306f\u3001\u3069\u3093\u306a\u30d7\u30ed\u30d1\u30c6\u30a3\u304c\u63d0\u4f9b\u3055\u308c\u3066\u3044\u308b\u306e\u304b\u4e00\u89a7\u8868\u3067\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n\n<table id=\"tablepress-654\" class=\"tablepress tablepress-id-654\">\n<thead>\n<tr class=\"row-1\">\n\t<th class=\"column-1\">\u30d7\u30ed\u30d1\u30c6\u30a3\u540d<\/th><th class=\"column-2\">\u5185\u5bb9<\/th>\n<\/tr>\n<\/thead>\n<tbody class=\"row-striping row-hover\">\n<tr class=\"row-2\">\n\t<td class=\"column-1\">location.href<\/td><td class=\"column-2\">\u6307\u5b9a\u3057\u305fURL\u306b\u753b\u9762\u9077\u79fb\u3059\u308b<\/td>\n<\/tr>\n<tr class=\"row-3\">\n\t<td class=\"column-1\">location.protocol<\/td><td class=\"column-2\">\u73fe\u5728\u306e\u30d7\u30ed\u30c8\u30b3\u30eb\u60c5\u5831(http:\u306a\u3069)\u3092\u53d6\u5f97\u3059\u308b<\/td>\n<\/tr>\n<tr class=\"row-4\">\n\t<td class=\"column-1\">location.host<\/td><td class=\"column-2\">\u30d7\u30ed\u30c8\u30b3\u30eb\u60c5\u5831\u3092\u9664\u5916\u3057\u305fURL\u3092\u53d6\u5f97\u3059\u308b(port\u60c5\u5831\u3042\u308a)<\/td>\n<\/tr>\n<tr class=\"row-5\">\n\t<td class=\"column-1\">location.hostname<\/td><td class=\"column-2\">\u30d7\u30ed\u30c8\u30b3\u30eb\u60c5\u5831\u3092\u9664\u5916\u3057\u305fURL\u3092\u53d6\u5f97\u3059\u308b(port\u60c5\u5831\u306a\u3057)<\/td>\n<\/tr>\n<tr class=\"row-6\">\n\t<td class=\"column-1\">location.port<\/td><td class=\"column-2\">\u30dd\u30fc\u30c8\u756a\u53f7\u3092\u53d6\u5f97\u30fb\u8a2d\u5b9a\u3059\u308b<\/td>\n<\/tr>\n<tr class=\"row-7\">\n\t<td class=\"column-1\">location.pathname<\/td><td class=\"column-2\">URL\u3067\u30d1\u30b9\u306e\u90e8\u5206\u3092\u53d6\u5f97\u30fb\u8a2d\u5b9a\u3059\u308b<\/td>\n<\/tr>\n<tr class=\"row-8\">\n\t<td class=\"column-1\">location.search<\/td><td class=\"column-2\">URL\u5185\u306e\u30af\u30a8\u30ea\u60c5\u5831\u3092\u62bd\u51fa\u3057\u3066\u53d6\u5f97\u3059\u308b<\/td>\n<\/tr>\n<tr class=\"row-9\">\n\t<td class=\"column-1\">location.hash<\/td><td class=\"column-2\">URL\u5185\u306e\u30cf\u30c3\u30b7\u30e5\u60c5\u5831\u3092\u62bd\u51fa\u3057\u3066\u53d6\u5f97\u3059\u308b<\/td>\n<\/tr>\n<tr class=\"row-10\">\n\t<td class=\"column-1\">location.origin<\/td><td class=\"column-2\">\u30d7\u30ed\u30c8\u30b3\u30eb\u3084\u30dd\u30fc\u30c8\u3092\u542b\u3081\u305fURL\u3092\u53d6\u5f97\u3059\u308b<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<!-- #tablepress-654 from cache -->\n<p>\u3055\u3089\u306b\u3001\u63d0\u4f9b\u3055\u308c\u3066\u3044\u308b\u30e1\u30bd\u30c3\u30c9\u306b\u3064\u3044\u3066\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n\n<table id=\"tablepress-655\" class=\"tablepress tablepress-id-655\">\n<thead>\n<tr class=\"row-1\">\n\t<th class=\"column-1\">\u30e1\u30bd\u30c3\u30c9\u540d<\/th><th class=\"column-2\">\u5185\u5bb9<\/th>\n<\/tr>\n<\/thead>\n<tbody class=\"row-striping row-hover\">\n<tr class=\"row-2\">\n\t<td class=\"column-1\">location.assign<\/td><td class=\"column-2\">\u6307\u5b9a\u3057\u305fURL\u306b\u753b\u9762\u9077\u79fb\u3057\u307e\u3059\uff08\u95b2\u89a7\u5c65\u6b74\u3078\u306e\u8ffd\u8a18\u3042\u308a\uff09<\/td>\n<\/tr>\n<tr class=\"row-3\">\n\t<td class=\"column-1\">location.replace<\/td><td class=\"column-2\">\u6307\u5b9a\u3057\u305fURL\u306b\u753b\u9762\u9077\u79fb\u3057\u307e\u3059\uff08\u95b2\u89a7\u5c65\u6b74\u3078\u306e\u8ffd\u8a18\u306a\u3057\uff09<\/td>\n<\/tr>\n<tr class=\"row-4\">\n\t<td class=\"column-1\">location.reload<\/td><td class=\"column-2\">\u73fe\u5728\u306eURL\u3092\u518d\u8aad\u8fbc\u3057\u307e\u3059\uff08true\u6307\u5b9a\u3060\u3068\u30b5\u30fc\u30d0\u30fc\u304b\u3089\u8aad\u307f\u8fbc\u307f\uff09<\/td>\n<\/tr>\n<tr class=\"row-5\">\n\t<td class=\"column-1\">location.tostring<\/td><td class=\"column-2\">\u73fe\u5728\u306eURL\u3092\u6587\u5b57\u5217\u3067\u53d6\u5f97\u3057\u307e\u3059<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<!-- #tablepress-655 from cache -->\n<h3>host\u3068hostname\u306e\u9055\u3044\u3068\u306f\uff1f<\/h3>\n<p>\u4e00\u89a7\u3092\u898b\u3066\u3044\u308b\u3068\u3001host\u3068hostname\u3068\u3044\u3046\u4f3c\u3066\u3044\u308b\u30d7\u30ed\u30d1\u30c6\u30a3\u304c\u3042\u308b\u3053\u3068\u306b\u304a\u6c17\u3065\u304d\u3067\u3057\u3087\u3046\u304b\uff1f<\/p>\n<p><b>host\u3068hostname<\/b>\u306f\u3001\u73fe\u5728\u958b\u3044\u3066\u3044\u308bWeb\u30da\u30fc\u30b8\u306e\u30db\u30b9\u30c8\u540d\u3092\u53d6\u5f97\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u30d7\u30ed\u30d1\u30c6\u30a3\u3067\u3059\u3002\u30db\u30b9\u30c8\u540d\u3068\u306f\u3001\u4f8b\u3048\u3070<b>https:\/\/www.sejuku.net\/blog<\/b>\u306e\u3088\u3046\u306aURL\u304c\u3042\u3063\u305f\u3068\u3059\u308b\u3068www.sejuku.net\u306e\u90e8\u5206\u306e\u3053\u3068\u3067\u3059\u3002<\/p>\n<p>\u5927\u62b5\u306e\u5834\u5408\u306f\u3001\u30d7\u30ed\u30c8\u30b3\u30eb\u60c5\u5831\u3092\u6392\u9664\u3057\u305f\u30c8\u30c3\u30d7\u30da\u30fc\u30b8\u306eURL\u304c\u8a72\u5f53\u3057\u307e\u3059\u3002\u3067\u306f\u3001\u3053\u306e2\u3064\u306e\u9055\u3044\u306f\u4f55\u306a\u306e\u304b\u3001\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u898b\u306a\u304c\u3089\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"lang:js decode:true\">console.log( location.host );\r\n\r\nconsole.log( location.hostname );\r\n<\/pre>\n<p>\u5b9f\u884c\u7d50\u679c<\/p>\n<pre class=\"theme:dark-terminal lang:default decode:true\">www.sejuku.net\r\n\r\nwww.sejuku.net\r\n<\/pre>\n<p>location\u306b\u5bfe\u3057\u3066host\u3068hostname\u3092\u8a18\u8ff0\u3059\u308b\u3068\u3001\u30db\u30b9\u30c8\u540d\u3092\u53d6\u5f97\u3067\u304d\u307e\u3057\u305f\u306d\u3002\u3069\u3061\u3089\u3082\u540c\u3058\u52d5\u4f5c\u3092\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u6c7a\u5b9a\u7684\u306b\u9055\u3046\u306e\u306f\u30dd\u30fc\u30c8\u756a\u53f7\u3092\u53d6\u5f97\u3059\u308b\u304b\u3069\u3046\u304b\u3068\u3044\u3046\u70b9\u3067\u3059\u3002<\/p>\n<p>\u5b9f\u306f\u3001Web\u30da\u30fc\u30b8\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u306b\u306fURL\u4ee5\u5916\u306b\u30dd\u30fc\u30c8\u756a\u53f7\u3068\u3044\u3046\u3082\u306e\u3082\u5fc5\u8981\u306b\u306a\u308a\u307e\u3059\u3002http:\u3067\u59cb\u307e\u308bWeb\u30da\u30fc\u30b8\u306f\u30dd\u30fc\u30c8\u756a\u53f7\u304c80\u3067\u3001https:\u306e\u5834\u5408\u306f\u30dd\u30fc\u30c8\u756a\u53f7\u304c443\u306e\u3088\u3046\u306b\u6c7a\u307e\u3063\u3066\u3044\u307e\u3059\u3002\uff08\u3010\u4f8b\u3011https:\/\/www.sejuku.net:443\/blog\uff09<\/p>\n<p>host\u306e\u5834\u5408\u306f\u30dd\u30fc\u30c8\u756a\u53f7\u3092\u542b\u3093\u3060\u30db\u30b9\u30c8\u540d\u3001hostname\u306e\u5834\u5408\u306f\u30dd\u30fc\u30c8\u756a\u53f7\u3092\u542b\u307e\u306a\u3044\u30db\u30b9\u30c8\u540d\u3092\u53d6\u5f97\u3059\u308b\u3068\u899a\u3048\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2>location\u30d7\u30ed\u30d1\u30c6\u30a3\u306e\u4f7f\u3044\u65b9<\/h2>\n<p>location\u306e\u57fa\u672c\u7684\u306a\u4ed5\u7d44\u307f\u3092\u78ba\u8a8d\u3067\u304d\u305f\u3068\u3053\u308d\u3067\u3001\u3082\u3063\u3068\u5177\u4f53\u7684\u306a\u6d3b\u7528\u65b9\u6cd5\u306b\u3064\u3044\u3066\u78ba\u8a8d\u3057\u3066\u3044\u304d\u307e\u3057\u3087\u3046\uff01\u4e3b\u306b\u3001<b>URL\u30fb\u30d1\u30b9\u30fb\u30d7\u30ed\u30c8\u30b3\u30eb\u30fb\u30dd\u30fc\u30c8\u756a\u53f7\u306e\u53d6\u5f97\u65b9\u6cd5<\/b>\u306b\u3064\u3044\u3066\u5b66\u3093\u3067\u3044\u304d\u307e\u3059\u3002<\/p>\n<h3>location.href\u3067URL\u3092\u53d6\u5f97\u3057\u3088\u3046<\/h3>\n<p>\u307e\u305a\u306f\u3082\u3063\u3068\u3082\u57fa\u672c\u3068\u306a\u308blocation.href\u3092\u4f7f\u3063\u3066URL\u3092\u53d6\u5f97\u30fb\u8868\u793a\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<pre class=\"lang:js decode:true\">var page_url = location.href;\r\nconsole.log(page_url);\r\n<\/pre>\n<p>\u5b9f\u884c\u7d50\u679c<\/p>\n<pre class=\"theme:dark-terminal lang:default decode:true\">http:\/\/www.sejuku.net\/blog\r\n<\/pre>\n<p>\u3053\u306e\u4f8b\u3067\u306f\u5f53\u30d6\u30ed\u30b0\u306e\u30c8\u30c3\u30d7\u30da\u30fc\u30b8\u3092\u8868\u793a\u3057\u3066\u3044\u308b\u306e\u3067\u3001\u5b9f\u884c\u7d50\u679c\u306b\u30d6\u30ed\u30b0URL\u304c\u8868\u793a\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u5358\u7d14\u306blocation.href\u3092\u8a18\u8ff0\u3059\u308b\u3060\u3051\u3067URL\u3092\u53d6\u5f97\u3067\u304d\u308b\u306e\u3067\u4fbf\u5229\u3067\u3059\u306d\u3002<\/p>\n<h3>pathname\u3067\u30d1\u30b9\u3092\u53d6\u5f97\u3059\u308b<\/h3>\n<p>pathname\u306fURL\u306e\u30d1\u30b9\u90e8\u5206\u3092\u53d6\u5f97\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u6a5f\u80fd\u3092\u6301\u3063\u3066\u304a\u308a\u3001\u5225\u306e\u30d1\u30b9\u306b\u5dee\u3057\u66ff\u3048\u308b\u3053\u3068\u3082\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p>\u4f8b\u3048\u3070https:\/\/www.sejuku.net\/blog\/35791\u306e\u3088\u3046\u306aURL\u304c\u3042\u3063\u305f\u3068\u3057\u307e\u3059\u3002\u3053\u306eURL\u306e\u30d1\u30b9\u306f\/blog\/35791\u306e\u90e8\u5206\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u3092\u53d6\u5f97\u3057\u305f\u3044\u5834\u5408\u306f\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306a\u30b3\u30fc\u30c9\u3092\u8a18\u8ff0\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"lang:js decode:true\">\/\/\u2460\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u53d6\u5f97\r\nconsole.log( location.pathname );\r\n\r\n\/\/\u2461\u5225\u306e\u30d1\u30b9\u306b\u7f6e\u304d\u63db\u3048\u308b\r\nlocation.pathname = '\/company.html';\r\n<\/pre>\n<p>\u2460\u306e\u3088\u3046\u306blocation\u306b\u5bfe\u3057\u3066pathname\u3092\u8a18\u8ff0\u3059\u308b\u3060\u3051\u3067\u53d6\u5f97\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002\u307e\u305f\u2461\u306e\u3088\u3046\u306b\u3001\u5225\u306e\u30d1\u30b9\u3092\u4ee3\u5165\u3059\u308b\u3053\u3068\u3067\u753b\u9762\u9077\u79fb\u3055\u305b\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u4e00\u822c\u7684\u306aWeb\u30b5\u30a4\u30c8\u3067\u3042\u308c\u3070\u3001\u540c\u4e00\u306e\u30db\u30b9\u30c8\u540d\u3067\u9077\u79fb\u3059\u308b\u3053\u3068\u304c\u591a\u3044\u306f\u305a\u306a\u306e\u3067\u3001\u305d\u306e\u3088\u3046\u306a\u30b1\u30fc\u30b9\u3067\u306fpathname\u3092\u4f7f\u3046\u3068\u826f\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<h3>protocol\u3067\u30d7\u30ed\u30c8\u30b3\u30eb\u3092\u53d6\u5f97\u3059\u308b<\/h3>\n<p>protocol\u306f\u3001\u73fe\u5728\u958b\u3044\u3066\u3044\u308bWeb\u30da\u30fc\u30b8\u306e\u30d7\u30ed\u30c8\u30b3\u30eb\u60c5\u5831\u3092\u53d6\u5f97\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3064\u307e\u308a\u3001URL\u306e\u6700\u521d\u306e\u90e8\u5206\u3067\u3042\u308b\u300chttp:\u300d\u3084\u300chttps:\u300d\u3092\u53d6\u5f97\u3067\u304d\u308b\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002<\/p>\n<p>\u6b21\u306e\u4f8b\u3092\u898b\u3066\u304f\u3060\u3055\u3044\uff01<\/p>\n<pre class=\"lang:js decode:true\">var proto = location.protocol;\r\n\r\nconsole.log( proto );\r\n<\/pre>\n<p>\u5b9f\u884c\u7d50\u679c<\/p>\n<pre class=\"theme:dark-terminal lang:default decode:true\">https:\r\n<\/pre>\n<p>\u3053\u306e\u4f8b\u306e\u3088\u3046\u306b\u3001location\u306b\u5bfe\u3057\u3066protocol\u3092\u8a18\u8ff0\u3059\u308b\u3060\u3051\u3067\u53d6\u5f97\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u6700\u8fd1\u3067\u306f\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u306e\u9ad8\u3044SSL\u5bfe\u5fdc\u306e\u300chttps:\u300d\u304c\u4f7f\u308f\u308c\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u304d\u307e\u3057\u305f\u3002\u3057\u304b\u3057\u3001\u307e\u3060\u307e\u3060\u300chttp:\u300d\u304b\u3089\u59cb\u307e\u308b\u4ee5\u524d\u306e\u30d7\u30ed\u30c8\u30b3\u30eb\u304c\u4f7f\u308f\u308c\u3066\u3044\u308b\u30b5\u30a4\u30c8\u306f\u591a\u3044\u306e\u3067\u3001\u6761\u4ef6\u5206\u5c90\u3059\u308b\u969b\u306a\u3069\u306b\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u305d\u3046\u3067\u3059\u306d\u3002<\/p>\n<h3>port\u3067\u30dd\u30fc\u30c8\u756a\u53f7\u3092\u53d6\u5f97\u3059\u308b<\/h3>\n<p>port\u3092\u4f7f\u3048\u3070\u3001\u30dd\u30fc\u30c8\u756a\u53f7\u306e\u307f\u3092\u53d6\u5f97\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"lang:js decode:true\">\/\/\u2460\u30dd\u30fc\u30c8\u756a\u53f7\u3092\u53d6\u5f97\u3059\u308b\r\nconsole.log( location.port );\r\n\r\n\/\/\u2461\u30dd\u30fc\u30c8\u756a\u53f7\u3092\u518d\u8a2d\u5b9a\u3059\u308b\r\nlocation.port = 80;\r\n<\/pre>\n<p>\u2460\u306flocation\u306b\u5bfe\u3057\u3066port\u3092\u8a18\u8ff0\u3059\u308b\u3060\u3051\u3067\u30dd\u30fc\u30c8\u756a\u53f7\u3092\u53d6\u5f97\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u7279\u5fb4\u7684\u306a\u306e\u306f\u2461\u306e\u3088\u3046\u306b\u3001\u5225\u306e\u30dd\u30fc\u30c8\u756a\u53f7\u3092\u65b0\u3057\u304f\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3068\u3053\u308d\u3067\u3059\u3002\u3082\u3061\u308d\u3093<b>\u30b5\u30fc\u30d0\u30fc\u304c\u5bfe\u5fdc\u3057\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059<\/b>\u304c\u3001\u9014\u4e2d\u3067\u52d5\u7684\u306b\u30dd\u30fc\u30c8\u756a\u53f7\u3092\u5909\u66f4\u3059\u308b\u969b\u306b\u306fport\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u4f7f\u3044\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2>location.href\u306e\u6d3b\u7528<\/h2>\n<p>\u3053\u306e\u7ae0\u3067\u306f\u3001\u3082\u3063\u3068\u3082\u3088\u304f\u4f7f\u3046location.href\u306e\u5fdc\u7528\u7684\u306a\u4f7f\u3044\u65b9\u306b\u3064\u3044\u3066\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\uff01\u4e3b\u306b\u3001\u4efb\u610f\u306eURL\u3092\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u3067\u753b\u9762\u9077\u79fb\u3092\u884c\u3046\u65b9\u6cd5\u306b\u3064\u3044\u3066\u5b66\u3093\u3067\u3044\u304d\u307e\u3059\u3002<\/p>\n<h3>location.href\u3092\u4f7f\u3063\u3066\u753b\u9762\u9077\u79fb\u3059\u308b<\/h3>\n<p>location.href\u306f\u3001\u30d6\u30e9\u30a6\u30b6\u306e\u753b\u9762\u9077\u79fb\u306b\u3082\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u6b21\u306e\u4f8b\u3092\u898b\u3066\u304f\u3060\u3055\u3044\uff01<\/p>\n<pre class=\"lang:js decode:true\">location.href = 'https:\/\/www.sejuku.net\/blog\/';\r\n<\/pre>\n<p>\u3053\u306e\u4f8b\u3067\u306f\u3001\u5f53\u30d6\u30ed\u30b0\u306eURL\u3092href\u3078\u4ee3\u5165\u3057\u3066\u3044\u307e\u3059\u306d\u3002\u3053\u308c\u306b\u3088\u308alocation.href\u306e\u5024\u304c\u4ee3\u5165\u3057\u305f\u5024\u306b\u7f6e\u304d\u63db\u3048\u3089\u308c\u308b\u306e\u3067\u3001\u753b\u9762\u306e\u9077\u79fb\u304c\u884c\u306a\u308f\u308c\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u306fURL\u304c\u4ee3\u5165\u3055\u308c\u305f\u6642\u70b9\u3067\u3059\u3050\u306b\u9077\u79fb\u51e6\u7406\u304c\u5b9f\u884c\u3055\u308c\u308b\u306e\u3067\u6ce8\u610f\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<h3>href\u3067target\u5c5e\u6027\u306e\u4ee3\u308f\u308a\u306bwindow.open\u3092\u4f7f\u3046<\/h3>\n<p>HTML\u306ea\u30bf\u30b0\u306a\u3069\u3067\u3088\u304f\u4f7f\u308f\u308c\u308b\u5c5e\u6027\u3068\u3057\u3066target\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u306f\u753b\u9762\u9077\u79fb\u3059\u308b\u6642\u306b\u3001\u30d6\u30e9\u30a6\u30b6\u306e\u5225\u30bf\u30d6\u3092\u8d77\u52d5\u3057\u3066\u8868\u793a\u3059\u308b\u3088\u3046\u306a\u30b1\u30fc\u30b9\u3067\u3088\u304f\u4f7f\u308f\u308c\u308b\u5c5e\u6027\u3067\u3059\u3002<\/p>\n<p>\u3053\u308c\u3068\u540c\u3058\u52d5\u4f5c\u3092href\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u4f7f\u3063\u3066\u5b9f\u73fe\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u308b\u306e\u3067\u3057\u3087\u3046\u304b\uff1f<\/p>\n<p>\u7d50\u8ad6\u304b\u3089\u8a00\u3063\u3066\u3057\u307e\u3046\u3068\u3001<b>href\u306btarget\u5c5e\u6027\u306f\u7528\u610f\u3055\u308c\u3066\u3044\u306a\u3044\u306e\u3067\u5b9f\u73fe\u3067\u304d\u307e\u305b\u3093\u3002<\/b>\u305f\u3060\u3057\u3001\u540c\u3058\u52d5\u4f5c\u3092\u5b9f\u73fe\u3059\u308b\u305f\u3081\u306e\u624b\u6cd5\u3068\u3057\u3066window.open\u3092\u5229\u7528\u3059\u308b\u65b9\u6cd5\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u6b21\u306e\u4f8b\u3092\u898b\u3066\u304f\u3060\u3055\u3044\uff01<\/p>\n<pre class=\"lang:js decode:true\">\/\/\u2460\u306e\u65b9\u6cd5\r\nwindow.open('http:\/\/www.sejuku.net', '_blank');\r\n\r\n\/\/\u2461\u306e\u65b9\u6cd5\r\nwindow.open().location.href = 'http:\/\/www.sejuku.net';\r\n<\/pre>\n<p>\u2460\u306e\u65b9\u6cd5\u306f\u3001window.open\u306e\u5f15\u6570\u306b\u9077\u79fb\u3055\u305b\u305f\u3044URL\u3068target\u5c5e\u6027\u3092\u8a18\u8ff0\u3059\u308b\u65b9\u6cd5\u3067\u3059\u3002JavaScript\u304b\u3089\u52d5\u7684\u306b\u753b\u9762\u9077\u79fb\u3055\u305b\u308b\u306b\u306f\u3001\u3053\u308c\u304c\u6700\u3082\u4e00\u822c\u7684\u306a\u65b9\u6cd5\u3068\u8a00\u3048\u308b\u3067\u3057\u3087\u3046\u3002<\/p>\n<p>\u307e\u305f\u3001\u2461\u306e\u65b9\u6cd5\u3092\u4f7f\u3048\u3070\u5c11\u3057\u5f37\u5f15\u3067\u3059\u304chref\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u6d3b\u7528\u3057\u3066\u5225\u30bf\u30d6\u3067\u9077\u79fb\u3055\u305b\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p>\u3069\u3061\u3089\u3082\u540c\u3058\u3088\u3046\u306a\u52d5\u4f5c\u306f\u3057\u307e\u3059\u304c\u3001\u3088\u307b\u3069\u306e\u7406\u7531\u304c\u306a\u3044\u9650\u308a\u306f\u672c\u6765\u306e\u7528\u9014\u3067\u6271\u3048\u308b\u2460\u306e\u65b9\u6cd5\u304c\u30d9\u30b9\u30c8\u3067\u3057\u3087\u3046\u3002<\/p>\n<h2>location\u306e\u30e1\u30bd\u30c3\u30c9\u6d3b\u7528\u6cd5<\/h2>\n<p>\u6b21\u306b\u3001location\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u6301\u3064\u30e1\u30bd\u30c3\u30c9\u306e\u6d3b\u7528\u65b9\u6cd5\u3092\u78ba\u8a8d\u3057\u3066\u3044\u304d\u307e\u3057\u3087\u3046\uff01\u3053\u3061\u3089\u3082\u30d7\u30ed\u30d1\u30c6\u30a3\u3068\u540c\u3058\u304f\u3001\u7c21\u5358\u306bURL\u3092\u53d6\u5f97\u30fb\u64cd\u4f5c\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<h3>replace\u3067\u30d6\u30e9\u30a6\u30b6\u753b\u9762\u3092\u9077\u79fb\u3059\u308b<\/h3>\n<p>replace\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3046\u3053\u3068\u3067\u3001\u81ea\u5206\u306e\u597d\u304d\u306aWeb\u30da\u30fc\u30b8\u3078\u52d5\u7684\u306b\u753b\u9762\u9077\u79fb\u3092\u884c\u306a\u3046\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002\u4e0b\u8a18\u306e\u3088\u3046\u306b\u3001replace\u30e1\u30bd\u30c3\u30c9\u306e\u5f15\u6570\u306b<b>\u9077\u79fb\u3055\u305b\u305f\u3044URL<\/b>\u3092\u6307\u5b9a\u3059\u308b\u3060\u3051\u3067\u3059\u3002<\/p>\n<pre class=\"lang:js decode:true\">location.replace(Web\u30da\u30fc\u30b8\u306eURL)\r\n<\/pre>\n<p>\u5177\u4f53\u7684\u306a\u4f8b\u3092\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"lang:html decode:true\"><button id=\"btn\">\u753b\u9762\u9077\u79fb<\/button>\r\n\r\n<script>\r\n      var btn = document.getElementById('btn');\r\n      \r\n      btn.addEventListener('click', function() {\r\n\r\n        location.replace('https:\/\/github.com\/');\r\n\r\n      })\r\n<\/script>\r\n\r\n<\/pre>\n<p>\u3053\u306e\u4f8b\u3067\u306f\u3001\u30dc\u30bf\u30f3\u8981\u7d20\u3092\u914d\u7f6e\u3057\u3066JavaScript\u304b\u3089\u30af\u30ea\u30c3\u30af\u30a4\u30d9\u30f3\u30c8\u3092\u53d6\u5f97\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u306d\u3002\u305d\u3057\u3066\u3001\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068replace\u30e1\u30bd\u30c3\u30c9\u304c\u5b9f\u884c\u3055\u308c\u3066\u3001\u5f15\u6570\u306b\u6307\u5b9a\u3057\u305fURL\u3078\u9077\u79fb\u3059\u308b\u3068\u3044\u3046\u308f\u3051\u3067\u3059\u3002<\/p>\n<p>\u3082\u3061\u308d\u3093\u3001\u5f15\u6570\u306eURL\u90e8\u5206\u306f\u5909\u6570\u306b\u7f6e\u304d\u63db\u3048\u3066\u3082\u554f\u984c\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<h3>replace\u3068href\u306e\u9055\u3044\u306b\u3064\u3044\u3066<\/h3>\n<p>\u3055\u3066\u3001\u3053\u3053\u307e\u3067\u306e\u89e3\u8aac\u3067replace\u3068href\u304c\u540c\u3058\u3088\u3046\u306a\u7528\u9014\u3067\u4f7f\u3048\u308b\u3068\u601d\u3063\u305f\u65b9\u3082\u3044\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u308c\u3067\u306freplace\u3068href\u306f\u4e00\u4f53\u3069\u3053\u304c\u9055\u3046\u306e\u3067\u3057\u3087\u3046\u304b\uff1f<\/p>\n<p>\u6700\u3082\u5927\u304d\u306a\u76f8\u9055\u70b9\u306f\u3001URL\u60c5\u5831\u304c\u30d6\u30e9\u30a6\u30b6\u306e\u5c65\u6b74\u306b\u6b8b\u308b\u304b\u3069\u3046\u304b\u3068\u3044\u3046\u70b9\u3067\u3059\u3002\u3053\u3053\u3067\u3001\u3082\u3046\u4e00\u5ea6replacehref\u306e\u8a18\u8ff0\u3092\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"lang:js decode:true\">\/\/\u2460replace\u306e\u5834\u5408\r\nlocation.replace('http:\/\/www.sejuku.net');\r\n\r\n\/\/\u2461href\u306e\u5834\u5408\r\nlocation.href = 'http:\/\/www.sejuku.net';\r\n<\/pre>\n<p>\u3053\u306e\u4f8b\u3067\u306f\u3001\u2460\u2461\u3069\u3061\u3089\u3082\u6307\u5b9a\u3057\u305fURL\u306b\u753b\u9762\u9077\u79fb\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u306d\u3002<\/p>\n<p>\u3057\u304b\u3057\u3001\u2460\u306ereplace\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u305f\u5834\u5408\u306b\u306f\u30d6\u30e9\u30a6\u30b6\u5c65\u6b74\u306b\u6b8b\u3089\u306a\u3044\u305f\u3081\u3001\u524d\u306eWeb\u30da\u30fc\u30b8\u306b\u300c\u623b\u308b\u300d\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3002\u53cd\u5bfe\u306b\u2461\u306e<b>href\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u305f\u5834\u5408\u306f\u30d6\u30e9\u30a6\u30b6\u5c65\u6b74\u304c\u6b8b\u308b<\/b>\u306e\u3067\u3001\u524d\u306e\u30da\u30fc\u30b8\u306b\u623b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u9055\u3044\u306fJavaScript\u3067Web\u30a2\u30d7\u30ea\u306a\u3069\u3092\u958b\u767a\u3059\u308b\u969b\u306b\u91cd\u8981\u306b\u306a\u3063\u3066\u304f\u308b\u306e\u3067\u3001\u3088\u304f\u899a\u3048\u3066\u304a\u304d\u307e\u3057\u3087\u3046\uff01<\/p>\n<h3>reload\u3067\u30d6\u30e9\u30a6\u30b6\u3092\u66f4\u65b0\u3059\u308b<\/h3>\n<p>reload\u30e1\u30bd\u30c3\u30c9\u306f\u3001\u73fe\u5728\u8868\u793a\u3055\u308c\u3066\u3044\u308bWeb\u30da\u30fc\u30b8\u3092\u66f4\u65b0\uff08\u518d\u8aad\u307f\u8fbc\u307f\uff09\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>reload\u30e1\u30bd\u30c3\u30c9\u306f\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u8a2d\u5b9a\u3067\u5f15\u6570\u306f\u5fc5\u8981\u3042\u308a\u307e\u305b\u3093\u3002\u5f15\u6570\u3092\u8a2d\u5b9a\u3057\u306a\u3044\u5834\u5408\u3001\u30d6\u30e9\u30a6\u30b6\u306e\u30ad\u30e3\u30c3\u30b7\u30e5\u304b\u3089\u30da\u30fc\u30b8\u306e\u518d\u8aad\u307f\u8fbc\u307f\u304c\u884c\u306a\u308f\u308c\u307e\u3059\u3002\u76f4\u63a5\u30b5\u30fc\u30d0\u30fc\u304b\u3089\u8aad\u307f\u8fbc\u307f\u305f\u3044\u5834\u5408\u306f\u3001<b>reload\u30e1\u30bd\u30c3\u30c9\u306e\u5f15\u6570\u3068\u3057\u3066true<\/b>\u3068\u8a2d\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"lang:html decode:true\">\r\n<p id=\"myid\">\u4eca\u306f<\/p>\r\n<input type=\"button\" value=\"Reload\" \/>\r\n\r\n<script>\r\n var now = new Date();\r\n var seconds = now.getSeconds();\r\n var myp = document.getElementById(\"myid\");\r\n\r\n myp.innerHTML += \"\u4eca\u306f\" + seconds + \"\u79d2\u3067\u3059\";\r\n\r\n var myfunc = function(){\r\n    window.location.reload();\r\n }\r\n <\/script>\r\n<\/pre>\n<p>\u4e0a\u8a18\u306e\u4f8b\u306f\u3001\u30b3\u30fc\u30c9\u3092\u5b9f\u884c\u3055\u305b\u305f\u6642\u306e\u6642\u523b\u306e\u79d2\u6570\u90e8\u5206\u306e\u307f\u3092\u8868\u793a\u3055\u305b\u3001\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u30d6\u30e9\u30a6\u30b6\u304c\u66f4\u65b0\u3059\u308b\u3068\u3044\u3046\u4ed5\u7d44\u307f\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u305d\u308c\u3067\u306f\u4ee5\u4e0b\u306e\u753b\u50cf\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>Reload\u30dc\u30bf\u30f3\u3092\u62bc\u3059\u524d\u306f11\u79d2\u3068\u8868\u793a\u3055\u308c\u3066\u6b62\u307e\u3063\u3066\u3044\u307e\u3059\u306d\u3002<br \/>\n<img decoding=\"async\" class=\"alignnone size-full wp-image-27015\" src=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/07\/2017-07-11.png\" alt=\"2017-07-11\" width=\"330\" height=\"119\" srcset=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/07\/2017-07-11.png 330w, https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/07\/2017-07-11-150x54.png 150w, https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/07\/2017-07-11-300x108.png 300w\" sizes=\"(max-width: 330px) 100vw, 330px\" \/><br \/>\n<div class=\"img-caption\">\u753b\u9762\u306b11\u79d2\u3068\u8868\u793a<\/div><\/p>\n<p>14\u79d2\u7d4c\u904e\u5f8c\u306breload\u30dc\u30bf\u30f3\u3092\u62bc\u3059\u3068\u3001\u753b\u9762\u304c\u66f4\u65b0\u3055\u308c\u3066\u8868\u793a\u304c25\u79d2\u306b\u306a\u3063\u3066\u3044\u308b\u306e\u304c\u5206\u304b\u308a\u307e\u3059\u3002<br \/>\n<img decoding=\"async\" class=\"alignnone size-full wp-image-27012\" src=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/07\/2017-07-11-1.png\" alt=\"2017-07-11 (1)\" width=\"332\" height=\"117\" srcset=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/07\/2017-07-11-1.png 332w, https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/07\/2017-07-11-1-150x53.png 150w, https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/07\/2017-07-11-1-300x106.png 300w\" sizes=\"(max-width: 332px) 100vw, 332px\" \/><br \/>\n<div class=\"img-caption\">\u66f4\u65b0\u3055\u308c\u3066\u753b\u9762\u8868\u793a\u304c25\u79d2\u306b\u5909\u66f4<\/div><\/p>\n<p>\u3064\u307e\u308a\u3001\u6b63\u5e38\u306b\u753b\u9762\u304c\u66f4\u65b0\u3055\u308c\u3066<b>JavaScript\u304c\u3082\u3046\u4e00\u5ea6\u8aad\u307f\u8fbc\u307e\u308c\u3066<\/b>\u5b9f\u884c\u3055\u308c\u305f\u308f\u3051\u3067\u3059\u3002\u3053\u306e\u3088\u3046\u306b\u3001reload\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3046\u3053\u3068\u3067\u30d6\u30e9\u30a6\u30b6\u304c\u66f4\u65b0\u3055\u308c\u308b\u306e\u3067\u3059\u3002<\/p>\n<h2>URL\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u53d6\u5f97\u306b\u3064\u3044\u3066<\/h2>\n<p>URL\u306e\u300c#\u300d\u304b\u3089\u59cb\u307e\u308b\u90e8\u5206\u306f\u300c\u30cf\u30c3\u30b7\u30e5\uff08\u30d5\u30e9\u30b0\u30e1\u30f3\u30c8\u8b58\u5225\u5b50\uff09\u300d\u3068\u547c\u3070\u308c\u3066\u3044\u307e\u3059\u3002hash\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u306b\u3088\u3063\u3066\u3001\u4f8b\u3048\u3070\u30da\u30fc\u30b8\u5185\u306e\u4efb\u610f\u306e\u4f4d\u7f6e\u3078\u306e\u79fb\u52d5\u3092\u884c\u306a\u3046\u3053\u3068\u306a\u3069\u304c\u51fa\u6765\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001URL\u306e\u300c?\u300d\u304b\u3089\u59cb\u307e\u308b\u90e8\u5206\u304c\u4e00\u822c\u7684\u306b\u300c\u30d1\u30e9\u30e1\u30fc\u30bf\uff08\u30af\u30a8\u30ea\uff09\u300d\u3068\u547c\u3070\u308c\u3066\u3044\u308b\u3082\u306e\u3067\u3059\u3002\u30af\u30a8\u30ea\u306e\u57fa\u672c\u7684\u306a\u69cb\u9020\u3068\u3057\u3066\u306f<b>\u300c\u5909\u6570\u540d\uff1d\u5909\u6570\u5024\u300d<\/b>\u3068\u3044\u3046\u5f62\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u5185\u304b\u3089\u3042\u308b\u30e6\u30fc\u30b6\u3092\u62bd\u51fa\u3057\u305f\u3044\u5834\u5408\u3001\u30e6\u30fc\u30b6\u540d\uff1dname\u3068\u3044\u3046\u30af\u30a8\u30ea\u3092\u4f5c\u6210\u3057\u305f\u308a\u3059\u308b\u308f\u3051\u3067\u3059\u3002<\/p>\n<p>\u3067\u306f\u3001\u3069\u3093\u306a\u98a8\u306b\u6d3b\u7528\u3057\u3066\u3044\u304f\u306e\u304b\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<h3>hash\u30d7\u30ed\u30d1\u30c6\u30a3\u3067URL\u306e\u30cf\u30c3\u30b7\u30e5\u60c5\u5831\u3092\u53d6\u5f97<\/h3>\n<p>URL\u306e\u30cf\u30c3\u30b7\u30e5\u60c5\u5831\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f\u300chash\u30d7\u30ed\u30d1\u30c6\u30a3\u300d\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u57fa\u672c\u7684\u306b\u306flocation\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306bhash\u3092\u5b9f\u884c\u3059\u308b\u3060\u3051\u3067\u5229\u7528\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"lang:js decode:true\">console.log(location.hash);\r\n<\/pre>\n<p>\u4e0a\u8a18\u306e\u4f8b\u3060\u3068\u3001\u73fe\u5728\u8868\u793a\u3055\u308c\u3066\u3044\u308bweb\u30da\u30fc\u30b8\u306eURL\u306b\u3042\u308b\u30cf\u30c3\u30b7\u30e5\u90e8\u5206\u3092\u30b3\u30f3\u30bd\u30fc\u30eb\u30ed\u30b0\u306b\u8868\u793a\u3055\u305b\u308b\u4e8b\u304c\u51fa\u6765\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u753b\u50cf\u306e\u3088\u3046\u306a\u7d50\u679c\u304c\u5f97\u3089\u308c\u307e\u3059\u3002<br \/>\n<img decoding=\"async\" class=\"alignnone size-full wp-image-27004\" src=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/07\/2017-07-05-11_LI.jpg\" alt=\"2017-07-05 (11)_LI\" width=\"1919\" height=\"852\" srcset=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/07\/2017-07-05-11_LI.jpg 1919w, https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/07\/2017-07-05-11_LI-150x67.jpg 150w, https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/07\/2017-07-05-11_LI-300x133.jpg 300w, https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/07\/2017-07-05-11_LI-640x284.jpg 640w, https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/07\/2017-07-05-11_LI-810x360.jpg 810w, https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/07\/2017-07-05-11_LI-1140x506.jpg 1140w\" sizes=\"(max-width: 1919px) 100vw, 1919px\" \/><br \/>\n<div class=\"img-caption\">URL\u306e\u30cf\u30c3\u30b7\u30e5\u90e8\u5206\u3092\u8868\u793a<\/div><\/p>\n<p>\u4e0a\u8a18\u306e\u4f8b\u306f\u3001\u300chttp:\/\/www.sejuku.net\/corp\/?cid=blog#section4\u300d\u3068\u3044\u3046URL\u3067\u5b9f\u884c\u3057\u3066\u307f\u305f\u306e\u3067\u3001\u30cf\u30c3\u30b7\u30e5\u90e8\u5206\u306f<b>\u300c#section4\u300d<\/b>\u3068\u8868\u793a\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<h3>search\u30d7\u30ed\u30d1\u30c6\u30a3\u3067URL\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\uff08\u30af\u30a8\u30ea\uff09\u3092\u53d6\u5f97<\/h3>\n<p>URL\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u60c5\u5831\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f\u300csearch\u30d7\u30ed\u30d1\u30c6\u30a3\u300d\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u3053\u3061\u3089\u3082location\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u5bfe\u3057\u3066search\u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u3067\u5229\u7528\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"lang:js decode:true\">console.log(location.search);\r\n<\/pre>\n<p>\u3053\u3046\u3057\u3066\u3001\u73fe\u5728\u8868\u793a\u3055\u308c\u3066\u3044\u308bweb\u30da\u30fc\u30b8\u306eURL\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u60c5\u5831\u3092\u30b3\u30f3\u30bd\u30fc\u30eb\u30ed\u30b0\u306b\u8868\u793a\u3055\u305b\u308b\u4e8b\u304c\u51fa\u6765\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u753b\u50cf\u306e\u3088\u3046\u306a\u7d50\u679c\u304c\u5f97\u3089\u308c\u307e\u3059\u3002<br \/>\n<img decoding=\"async\" class=\"alignnone size-full wp-image-27003\" src=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/07\/2017-07-05-10.png\" alt=\"2017-07-05 (10)\" width=\"1919\" height=\"852\" srcset=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/07\/2017-07-05-10.png 1919w, https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/07\/2017-07-05-10-150x67.png 150w, https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/07\/2017-07-05-10-300x133.png 300w, https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/07\/2017-07-05-10-640x284.png 640w, https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/07\/2017-07-05-10-810x360.png 810w, https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/07\/2017-07-05-10-1140x506.png 1140w\" sizes=\"(max-width: 1919px) 100vw, 1919px\" \/><br \/>\n<div class=\"img-caption\">URL\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\uff08\u30af\u30a8\u30ea\uff09\u3092\u8868\u793a<\/div><\/p>\n<p>\u4eca\u56de\u306f\u3001\u300chttp:\/\/www.sejuku.net\/blog\/?s=JavaScript\u300d\u3068\u3044\u3046URL\u3067\u5b9f\u884c\u3057\u3066\u307f\u305f\u306e\u3067\u3001\u30d1\u30e9\u30e1\u30fc\u30bf\u60c5\u5831\u306f<b>\u300c?s=JavaScript\u300d<\/b>\u3068\u8868\u793a\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<h2>\u6b63\u898f\u8868\u73fe\u3084split()\u3067URL\u3092\u53d6\u5f97<\/h2>\n<p>\u3053\u306e\u7ae0\u3067\u306f\u3001JavaScript\u3067URL\u3092\u64cd\u4f5c\u3059\u308b\u305f\u3081\u306e\u5fdc\u7528\u6280\u306b\u3064\u3044\u3066\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\uff01<\/p>\n<p>\u4e3b\u306b\u3001\u6b63\u898f\u8868\u73fe\u3092\u4f7f\u3063\u305fURL\u53d6\u5f97\u3068\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u968e\u5c64\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u5b66\u3093\u3067\u3044\u304d\u307e\u3059\u3002<\/p>\n<h3>\u6b63\u898f\u8868\u73fe\u3067URL\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5<\/h3>\n<p>\u3053\u308c\u307e\u3067URL\u306e\u53d6\u5f97\u306b\u306flocation\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u4f7f\u3063\u3066\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u3057\u304b\u3057\u3001\u5834\u5408\u306b\u3088\u3063\u3066\u306f\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u306a\u3069\u5916\u90e8\u304b\u3089URL\u3092\u53d6\u5f97\u3059\u308b\u3053\u3068\u3082\u3042\u308b\u3067\u3057\u3087\u3046\u3002\u3053\u306e\u3088\u3046\u306a\u30b1\u30fc\u30b9\u3067\u306f\u3001location\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u306f\u306a\u304f\u6b63\u898f\u8868\u73fe\u3067URL\u90e8\u5206\u3060\u3051\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5\u304c\u4f7f\u308f\u308c\u307e\u3059\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5f53\u793e\u306e\u30b5\u30a4\u30c8URL\u3092\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"lang:js decode:true\">https:\/\/www.sejuku.net\r\n<\/pre>\n<p>\u3053\u306e\u3088\u3046\u306a\u4e00\u822c\u7684\u306aURL\u3092\u62bd\u51fa\u3059\u308b\u305f\u3081\u306e\u6b63\u898f\u8868\u73fe\u3092\u305d\u306e\u307e\u307e\u66f8\u304f\u3068\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"lang:js decode:true\">https?:\/\/(www)?.[a-zA-Z0-9]*.net\r\n<\/pre>\n<p>\u3057\u304b\u3057\u3001\u3053\u306e\u307e\u307e\u3067\u306f\u3054\u304f\u4e00\u90e8\u306eURL\u3057\u304b\u5bfe\u5fdc\u3067\u304d\u307e\u305b\u3093\u3088\u306d\uff1f<\/p>\n<p>\u4f8b\u3048\u3070\u3001\u30cf\u30c3\u30b7\u30e5\u3084\u30af\u30a8\u30ea\u306a\u3069\u304c\u4ed8\u4e0e\u3055\u308c\u3066\u3044\u305f\u308a\u3001\u300c.com\u300d\u3084\u300c.co.jp\u300d\u306a\u3069\u306e\u8868\u8a18\u306b\u306a\u308c\u3070\u5bfe\u5fdc\u3067\u304d\u306a\u304f\u306a\u308a\u307e\u3059\u3002\u305d\u3053\u3067\u3001\u8003\u3048\u65b9\u3068\u3057\u3066\u306f\u300chttps:\/\/\u300d\u4ee5\u964d\u306b\u7d9a\u304f\u82f1\u6570\u5b57\u306e\u6587\u5b57\u5217\u3067URL\u306b\u4f7f\u308f\u308c\u308b\u30ad\u30e3\u30e9\u30af\u30bf\u3092\u6b63\u898f\u8868\u73fe\u3067\u5168\u90e8\u6307\u5b9a\u3059\u308b\u308f\u3051\u3067\u3059\u3002<\/p>\n<p>\u3059\u308b\u3068\u3001\u4e00\u822c\u7684\u306b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"lang:js decode:true\">http(s)?:\/\/[a-zA-Z0-9-.!'()*;\/?:@&amp;=+$,%#]+\r\n<\/pre>\n<p>\u3053\u308c\u3067\u3001\u300chttp \/ https:\/\/\u300d\u306b\u7d9a\u304fURL\u304c\u3069\u306e\u3088\u3046\u306a\u8868\u8a18\u306b\u306a\u3063\u3066\u3082\u3001\u4e00\u822c\u7684\u306aWeb\u30b5\u30a4\u30c8\u3067\u3042\u308c\u3070\u5bfe\u5fdc\u3067\u304d\u308b\u308f\u3051\u3067\u3059\u3002<\/p>\n<p>\u3061\u306a\u307f\u306b\u3001\u6b63\u898f\u8868\u73fe\u306b\u3064\u3044\u3066\u307e\u3060\u4e0d\u5b89\u306a\u65b9\u306f\u4ee5\u4e0b\u306e\u8a18\u4e8b\u3067\u57fa\u672c\u304b\u3089\u5fdc\u7528\u307e\u3067\u3092\u307e\u3068\u3081\u3066\u3044\u308b\u306e\u3067\u305c\u3072\u53c2\u8003\u306b\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\uff01<\/p>\n            <a href=\"https:\/\/www.sejuku.net\/blog\/20973\" class=\"blog-card-anchor\">\n                <div class=\"blog-card\">\n                <div class=\"blog-card-content\">\n                    <div class=\"blog-card-thumbnail\">\n                    <img decoding=\"async\" class=\"blog-card-thumbnail-img\" src=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/08\/javascript-tutorial-top-150x86.png\">\n                    <\/div>\n                    <div class=\"blog-card-title-wrap\">\n                    <div class=\"blog-card-title\">\u3010JavaScript\u5165\u9580\u30114\u3064\u306e\u30d1\u30bf\u30fc\u30f3\u3067\u7406\u89e3\u3059\u308b\u6b63\u898f\u8868\u73fe\u306e\u4f7f\u3044\u65b9\u307e\u3068\u3081\uff01<\/div>\n                    <div class=\"blog-card-update-date\">\u66f4\u65b0\u65e5\uff1a2024\u5e745\u67086\u65e5<\/div>\n                    <\/div>\n                <\/div>\n                <\/div>\n            <\/a>\n            \n<h3>split()\u3067URL\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u968e\u5c64\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5<\/h3>\n<p>\u4eca\u5ea6\u306f\u3001URL\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u968e\u5c64\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\uff01<\/p>\n<p>\u4f8b\u3048\u3070\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306aURL\u3092\u30a4\u30e1\u30fc\u30b8\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"lang:js decode:true\">https:\/\/www.sejuku.net\/one\/two\/three\/index.html\r\n<\/pre>\n<p>\u3053\u306e\u5834\u5408\u300cindex.html\u300d\u306e\u30d5\u30a1\u30a4\u30eb\u304c\u914d\u7f6e\u3055\u308c\u3066\u3044\u308b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306f\u300cthree\u300d\u306b\u306a\u308a\u307e\u3059\u3088\u306d\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u3001\u3053\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u968e\u5c64\u3092\u53d6\u5f97\u3057\u305f\u3044\u5834\u5408\u306f\u3069\u3046\u3059\u308c\u3070\u826f\u3044\u3067\u3057\u3087\u3046\u304b\uff1f\u5b9f\u306f\u3001\u3053\u308c\u307e\u3067\u5229\u7528\u3057\u3066\u304d\u305f\u300clocation.href\u300d\u3092\u4f7f\u3063\u3066\u53d6\u5f97\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u6b21\u306e\u30b5\u30f3\u30d7\u30eb\u4f8b\u3092\u898b\u3066\u304f\u3060\u3055\u3044\uff01<\/p>\n<pre class=\"lang:js decode:true\">var result = location.href.split('\/');\r\n  \r\nconsole.log(result);\r\n<\/pre>\n<p>\u5b9f\u884c\u7d50\u679c<\/p>\n<pre class=\"theme:dark-terminal lang:default decode:true\">[\"https:\", \"\", \"www.sejuku.net\", \"one\", \"two\", \"three\", \"index.html\"]\r\n<\/pre>\n<p>\u3053\u306e\u4f8b\u3067\u306f\u3001\u300clocation.href\u300d\u306b\u7d9a\u3051\u3066<b>\u300csplit()\u300d<\/b>\u3092\u4f7f\u3046\u3053\u3068\u3067\u300c\/\u300d\u3092\u533a\u5207\u308a\u6587\u5b57\u306b\u3057\u3066\u3059\u3079\u3066\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u968e\u5c64\u3092\u914d\u5217\u306b\u683c\u7d0d\u3057\u3066\u3044\u308b\u308f\u3051\u3067\u3059\u3002\u3053\u306e\u3088\u3046\u306b\u3059\u308b\u3053\u3068\u3067\u3001JavaScript\u304b\u3089\u968e\u5c64\u3092\u64cd\u4f5c\u3057\u3084\u3059\u304f\u306a\u308a\u307e\u3059\u306d\u3002<\/p>\n<p>\u305d\u3053\u3067\u3001index.html\u304c\u914d\u7f6e\u3055\u308c\u3066\u3044\u308b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f\u6b21\u306e\u3088\u3046\u306b\u8a18\u8ff0\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:js decode:true\">var result = location.href.split('\/');\r\n  \r\nconsole.log(result[result.length - 2]);\r\n<\/pre>\n<p>\u5b9f\u884c\u7d50\u679c<\/p>\n<pre class=\"theme:dark-terminal lang:default decode:true\">three\r\n<\/pre>\n<p>\u914d\u5217\u306b\u683c\u7d0d\u3055\u308c\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u968e\u5c64\u306e\u3046\u3061\u3001\u914d\u5217\u8981\u7d20\u306e\u5f8c\u308d\u304b\u30892\u756a\u76ee\u306b\u3042\u308b\u306e\u304cindex.html\u304c\u914d\u7f6e\u3055\u308c\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3067\u3059\u3002\u305d\u306e\u305f\u3081\u3001<b>\u300cresult[result.length \u2013 2]\u300d<\/b>\u3068\u8a18\u8ff0\u3059\u308b\u3053\u3068\u3067\u898b\u4e8b\u306b\u300cthree\u300d\u3068\u3044\u3046\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u53d6\u5f97\u3067\u304d\u3066\u3044\u308b\u306e\u304c\u5206\u304b\u308a\u307e\u3059\u306d\u3002<\/p>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>\u4eca\u56de\u306f\u3001location\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u6d3b\u7528\u3057\u305fURL\u306e\u53d6\u5f97\u65b9\u6cd5\u306b\u3064\u3044\u3066\u5b66\u7fd2\u3057\u307e\u3057\u305f\uff01<\/p>\n<p>\u69d8\u3005\u306a\u30d7\u30ed\u30d1\u30c6\u30a3\u3084\u30e1\u30bd\u30c3\u30c9\u3092\u542b\u3080<b>location\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u4f7f\u3044\u65b9<\/b>\u3092\u30de\u30b9\u30bf\u30fc\u3059\u308b\u3053\u3068\u306b\u3088\u3063\u3066\u3001\u30a6\u30a7\u30d6\u30da\u30fc\u30b8\u306e\u8272\u3005\u306a\u60c5\u5831\u3092\u53d6\u5f97\u3059\u308b\u4e8b\u304c\u51fa\u6765\u307e\u3059\u3002<\/p>\n<p>\u5225\u30da\u30fc\u30b8\u3078\u306e\u79fb\u52d5\u3084\u30af\u30a8\u30ea\u306e\u8a2d\u5b9a\u306a\u3069\u3001\u30ef\u30f3\u30e9\u30f3\u30af\u4e0a\u306e<b>JavaScript\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u66f8\u304f\u306e\u306b\u5f79\u7acb\u3064\u30c6\u30af\u30cb\u30c3\u30af<\/b>\u306a\u306e\u3067\u3001\u899a\u3048\u3066\u304a\u3044\u3066\u640d\u306f\u306a\u3044\u3067\u3059\u306d\u3002\u305c\u3072\u3001location\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u30de\u30b9\u30bf\u30fc\u3057\u3066\u4f7f\u3044\u3053\u306a\u3057\u3066\u304f\u3060\u3055\u3044\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>URL\u306e\u60c5\u5831\u3063\u3066\u3069\u3046\u3084\u3063\u3066\u53d6\u5f97\u3059\u308b\u306e\uff1f URL\u304c\u6301\u3063\u3066\u3044\u308b\u30d1\u30e9\u30e1\u30fc\u30bf\u306a\u3069\u3092\u6d3b\u7528\u3057\u305f\u3044 location\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f7f\u3044\u3053\u306a\u3057\u305f\u3044 Web\u30b5\u30a4\u30c8\u306eURL\u306fJavaScript\u304b\u3089\u53d6\u5f97\u3057\u3066\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u5236\u5fa1\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067 [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":94495,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"swell_btn_cv_data":"","footnotes":""},"categories":[2346],"tags":[95,2156,2157],"class_list":["post-26999","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-javascript-study","tag-javascript","tag-location","tag-url"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>JavaScript\u3067URL\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f\uff1flocation\u306e\u4f7f\u3044\u65b9\u3092\u5fb9\u5e95\u89e3\u8aac | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0<\/title>\n<meta name=\"description\" content=\"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c JavaScript\u3067URL\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f\uff1flocation\u306e\u4f7f\u3044\u65b9\u3092\u5fb9\u5e95\u89e3\u8aac \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.sejuku.net\/blog\/26999\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JavaScript\u3067URL\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f\uff1flocation\u306e\u4f7f\u3044\u65b9\u3092\u5fb9\u5e95\u89e3\u8aac | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\" \/>\n<meta property=\"og:description\" content=\"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c JavaScript\u3067URL\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f\uff1flocation\u306e\u4f7f\u3044\u65b9\u3092\u5fb9\u5e95\u89e3\u8aac \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sejuku.net\/blog\/26999\" \/>\n<meta property=\"og:site_name\" content=\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/sejuku2013\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/sejuku2013\/\" \/>\n<meta property=\"article:published_time\" content=\"2017-07-13T04:47:12+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-05-06T02:43:52+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/07\/JSURL.jpeg\" \/>\n\t<meta property=\"og:image:width\" content=\"810\" \/>\n\t<meta property=\"og:image:height\" content=\"460\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/samuraijuku\" \/>\n<meta name=\"twitter:site\" content=\"@samuraijuku\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/26999#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/26999\"},\"author\":{\"name\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/person\\\/e8ca7fd09857a736a25e6b4455a3ab61\"},\"headline\":\"JavaScript\u3067URL\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f\uff1flocation\u306e\u4f7f\u3044\u65b9\u3092\u5fb9\u5e95\u89e3\u8aac\",\"datePublished\":\"2017-07-13T04:47:12+00:00\",\"dateModified\":\"2024-05-06T02:43:52+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/26999\"},\"wordCount\":326,\"publisher\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/26999#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/07\\\/JSURL.jpeg\",\"keywords\":[\"JavaScript\",\"location\",\"url\"],\"articleSection\":[\"Javascript\u5b66\u7fd2\"],\"inLanguage\":\"ja\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/26999\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/26999\",\"name\":\"JavaScript\u3067URL\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f\uff1flocation\u306e\u4f7f\u3044\u65b9\u3092\u5fb9\u5e95\u89e3\u8aac | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/26999#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/26999#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/07\\\/JSURL.jpeg\",\"datePublished\":\"2017-07-13T04:47:12+00:00\",\"dateModified\":\"2024-05-06T02:43:52+00:00\",\"description\":\"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c JavaScript\u3067URL\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f\uff1flocation\u306e\u4f7f\u3044\u65b9\u3092\u5fb9\u5e95\u89e3\u8aac \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/26999#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/26999\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/26999#primaryimage\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/07\\\/JSURL.jpeg\",\"contentUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/07\\\/JSURL.jpeg\",\"width\":810,\"height\":460},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/26999#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"JavaScript\u3067URL\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f\uff1flocation\u306e\u4f7f\u3044\u65b9\u3092\u5fb9\u5e95\u89e3\u8aac\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/\",\"name\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\",\"description\":\"\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u5b66\u7fd2\u306e\u3059\u3079\u3066\u304c\u30b3\u30b3\u306b\u3002\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ja\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#organization\",\"name\":\"\u682a\u5f0f\u4f1a\u793eSAMURAI\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/logo.png\",\"contentUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/logo.png\",\"width\":600,\"height\":600,\"caption\":\"\u682a\u5f0f\u4f1a\u793eSAMURAI\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/sejuku2013\",\"https:\\\/\\\/x.com\\\/samuraijuku\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCCFOQO5aDK0xXam4cUQXT8g\\\/featured\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/person\\\/e8ca7fd09857a736a25e6b4455a3ab61\",\"name\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g\",\"caption\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8\"},\"description\":\"\u3010\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u3011 DX\u8a8d\u5b9a\u53d6\u5f97\u4e8b\u696d\u8005\u306b\u9078\u5b9a\u3055\u308c\u3066\u3044\u308b\u682a\u5f0f\u4f1a\u793eSAMURAI\u306e\u30de\u30fc\u30b1\u30c6\u30a3\u30f3\u30b0\u30fb\u30b3\u30df\u30e5\u30cb\u30b1\u30fc\u30b7\u30e7\u30f3\u90e8\u304c\u904b\u55b6\u3002\u300c\u8cea\u306e\u9ad8\u3044IT\u6559\u80b2\u3092\u3001\u3059\u3079\u3066\u306e\u4eba\u306b\u300d\u3092\u30df\u30c3\u30b7\u30e7\u30f3\u306b\u3001IT\u30fb\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3092\u5b66\u3073\u59cb\u3081\u305f\u521d\u5b66\u8005\u306e\u65b9\u306b\u5411\u3051\u8a18\u4e8b\u3092\u57f7\u7b46\u3002 \u7d2f\u8a08\u6307\u5c0e\u8005\u65704\u4e075,000\u540d\u4ee5\u4e0a\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u300c\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u300d\u3001\u7d2f\u8a08\u767b\u9332\u8005\u65701\u4e078,000\u4eba\u4ee5\u4e0a\u306e\u30aa\u30f3\u30e9\u30a4\u30f3\u5b66\u7fd2\u30b5\u30fc\u30d3\u30b9\u300c\u4f8d\u30c6\u30e9\u30b3\u30e4\u300d\u3067\u6271\u3046\u6559\u6750\u958b\u767a\u306e\u30ce\u30a6\u30cf\u30a6\u30012013\u5e74\u306e\u5275\u696d\u304b\u3089\u904b\u55b6\u3067\u5f97\u305f\u77e5\u898b\u306b\u57fa\u3065\u304d\u3001\u8a18\u4e8b\u306e\u57f7\u7b46\u3060\u3051\u3067\u306a\u304f\u7de8\u96c6\u30fb\u76e3\u4fee\u3082\u62c5\u5f53\u3057\u3066\u3044\u307e\u3059\u3002 \u3010\u5c02\u9580\u5206\u91ce\u3011 IT\\\/Web\u958b\u767a\\\/AI\u30fb\u30ed\u30dc\u30c3\u30c8\u958b\u767a\\\/\u30a4\u30f3\u30d5\u30e9\u958b\u767a\\\/\u30b2\u30fc\u30e0\u958b\u767a\\\/AI\\\/Web\u30c7\u30b6\u30a4\u30f3\",\"sameAs\":[\"https:\\\/\\\/www.sejuku.net\\\/\",\"https:\\\/\\\/www.facebook.com\\\/sejuku2013\\\/\",\"https:\\\/\\\/www.instagram.com\\\/samuraiengineer_official\\\/\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/samuraijuku\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCCFOQO5aDK0xXam4cUQXT8g\"],\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/author\\\/samurai-blog\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"JavaScript\u3067URL\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f\uff1flocation\u306e\u4f7f\u3044\u65b9\u3092\u5fb9\u5e95\u89e3\u8aac | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","description":"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c JavaScript\u3067URL\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f\uff1flocation\u306e\u4f7f\u3044\u65b9\u3092\u5fb9\u5e95\u89e3\u8aac \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.sejuku.net\/blog\/26999","og_locale":"ja_JP","og_type":"article","og_title":"JavaScript\u3067URL\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f\uff1flocation\u306e\u4f7f\u3044\u65b9\u3092\u5fb9\u5e95\u89e3\u8aac | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","og_description":"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c JavaScript\u3067URL\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f\uff1flocation\u306e\u4f7f\u3044\u65b9\u3092\u5fb9\u5e95\u89e3\u8aac \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002","og_url":"https:\/\/www.sejuku.net\/blog\/26999","og_site_name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","article_publisher":"https:\/\/www.facebook.com\/sejuku2013","article_author":"https:\/\/www.facebook.com\/sejuku2013\/","article_published_time":"2017-07-13T04:47:12+00:00","article_modified_time":"2024-05-06T02:43:52+00:00","og_image":[{"width":810,"height":460,"url":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/07\/JSURL.jpeg","type":"image\/jpeg"}],"author":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/samuraijuku","twitter_site":"@samuraijuku","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.sejuku.net\/blog\/26999#article","isPartOf":{"@id":"https:\/\/www.sejuku.net\/blog\/26999"},"author":{"name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8","@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/person\/e8ca7fd09857a736a25e6b4455a3ab61"},"headline":"JavaScript\u3067URL\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f\uff1flocation\u306e\u4f7f\u3044\u65b9\u3092\u5fb9\u5e95\u89e3\u8aac","datePublished":"2017-07-13T04:47:12+00:00","dateModified":"2024-05-06T02:43:52+00:00","mainEntityOfPage":{"@id":"https:\/\/www.sejuku.net\/blog\/26999"},"wordCount":326,"publisher":{"@id":"https:\/\/www.sejuku.net\/blog\/#organization"},"image":{"@id":"https:\/\/www.sejuku.net\/blog\/26999#primaryimage"},"thumbnailUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/07\/JSURL.jpeg","keywords":["JavaScript","location","url"],"articleSection":["Javascript\u5b66\u7fd2"],"inLanguage":"ja"},{"@type":"WebPage","@id":"https:\/\/www.sejuku.net\/blog\/26999","url":"https:\/\/www.sejuku.net\/blog\/26999","name":"JavaScript\u3067URL\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f\uff1flocation\u306e\u4f7f\u3044\u65b9\u3092\u5fb9\u5e95\u89e3\u8aac | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","isPartOf":{"@id":"https:\/\/www.sejuku.net\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.sejuku.net\/blog\/26999#primaryimage"},"image":{"@id":"https:\/\/www.sejuku.net\/blog\/26999#primaryimage"},"thumbnailUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/07\/JSURL.jpeg","datePublished":"2017-07-13T04:47:12+00:00","dateModified":"2024-05-06T02:43:52+00:00","description":"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c JavaScript\u3067URL\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f\uff1flocation\u306e\u4f7f\u3044\u65b9\u3092\u5fb9\u5e95\u89e3\u8aac \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002","breadcrumb":{"@id":"https:\/\/www.sejuku.net\/blog\/26999#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sejuku.net\/blog\/26999"]}]},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.sejuku.net\/blog\/26999#primaryimage","url":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/07\/JSURL.jpeg","contentUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/07\/JSURL.jpeg","width":810,"height":460},{"@type":"BreadcrumbList","@id":"https:\/\/www.sejuku.net\/blog\/26999#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sejuku.net\/blog\/"},{"@type":"ListItem","position":2,"name":"JavaScript\u3067URL\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f\uff1flocation\u306e\u4f7f\u3044\u65b9\u3092\u5fb9\u5e95\u89e3\u8aac"}]},{"@type":"WebSite","@id":"https:\/\/www.sejuku.net\/blog\/#website","url":"https:\/\/www.sejuku.net\/blog\/","name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","description":"\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u5b66\u7fd2\u306e\u3059\u3079\u3066\u304c\u30b3\u30b3\u306b\u3002","publisher":{"@id":"https:\/\/www.sejuku.net\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.sejuku.net\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ja"},{"@type":"Organization","@id":"https:\/\/www.sejuku.net\/blog\/#organization","name":"\u682a\u5f0f\u4f1a\u793eSAMURAI","url":"https:\/\/www.sejuku.net\/blog\/","logo":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2023\/07\/logo.png","contentUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2023\/07\/logo.png","width":600,"height":600,"caption":"\u682a\u5f0f\u4f1a\u793eSAMURAI"},"image":{"@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/sejuku2013","https:\/\/x.com\/samuraijuku","https:\/\/www.youtube.com\/channel\/UCCFOQO5aDK0xXam4cUQXT8g\/featured"]},{"@type":"Person","@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/person\/e8ca7fd09857a736a25e6b4455a3ab61","name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/secure.gravatar.com\/avatar\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g","caption":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8"},"description":"\u3010\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u3011 DX\u8a8d\u5b9a\u53d6\u5f97\u4e8b\u696d\u8005\u306b\u9078\u5b9a\u3055\u308c\u3066\u3044\u308b\u682a\u5f0f\u4f1a\u793eSAMURAI\u306e\u30de\u30fc\u30b1\u30c6\u30a3\u30f3\u30b0\u30fb\u30b3\u30df\u30e5\u30cb\u30b1\u30fc\u30b7\u30e7\u30f3\u90e8\u304c\u904b\u55b6\u3002\u300c\u8cea\u306e\u9ad8\u3044IT\u6559\u80b2\u3092\u3001\u3059\u3079\u3066\u306e\u4eba\u306b\u300d\u3092\u30df\u30c3\u30b7\u30e7\u30f3\u306b\u3001IT\u30fb\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3092\u5b66\u3073\u59cb\u3081\u305f\u521d\u5b66\u8005\u306e\u65b9\u306b\u5411\u3051\u8a18\u4e8b\u3092\u57f7\u7b46\u3002 \u7d2f\u8a08\u6307\u5c0e\u8005\u65704\u4e075,000\u540d\u4ee5\u4e0a\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u300c\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u300d\u3001\u7d2f\u8a08\u767b\u9332\u8005\u65701\u4e078,000\u4eba\u4ee5\u4e0a\u306e\u30aa\u30f3\u30e9\u30a4\u30f3\u5b66\u7fd2\u30b5\u30fc\u30d3\u30b9\u300c\u4f8d\u30c6\u30e9\u30b3\u30e4\u300d\u3067\u6271\u3046\u6559\u6750\u958b\u767a\u306e\u30ce\u30a6\u30cf\u30a6\u30012013\u5e74\u306e\u5275\u696d\u304b\u3089\u904b\u55b6\u3067\u5f97\u305f\u77e5\u898b\u306b\u57fa\u3065\u304d\u3001\u8a18\u4e8b\u306e\u57f7\u7b46\u3060\u3051\u3067\u306a\u304f\u7de8\u96c6\u30fb\u76e3\u4fee\u3082\u62c5\u5f53\u3057\u3066\u3044\u307e\u3059\u3002 \u3010\u5c02\u9580\u5206\u91ce\u3011 IT\/Web\u958b\u767a\/AI\u30fb\u30ed\u30dc\u30c3\u30c8\u958b\u767a\/\u30a4\u30f3\u30d5\u30e9\u958b\u767a\/\u30b2\u30fc\u30e0\u958b\u767a\/AI\/Web\u30c7\u30b6\u30a4\u30f3","sameAs":["https:\/\/www.sejuku.net\/","https:\/\/www.facebook.com\/sejuku2013\/","https:\/\/www.instagram.com\/samuraiengineer_official\/","https:\/\/x.com\/https:\/\/twitter.com\/samuraijuku","https:\/\/www.youtube.com\/channel\/UCCFOQO5aDK0xXam4cUQXT8g"],"url":"https:\/\/www.sejuku.net\/blog\/author\/samurai-blog"}]}},"_links":{"self":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/posts\/26999","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/comments?post=26999"}],"version-history":[{"count":0,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/posts\/26999\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/media\/94495"}],"wp:attachment":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/media?parent=26999"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/categories?post=26999"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/tags?post=26999"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}