{"id":4329,"date":"2013-02-26T01:05:42","date_gmt":"2013-02-25T16:05:42","guid":{"rendered":"http:\/\/www.webcyou.com\/?p=4329"},"modified":"2013-02-26T01:05:42","modified_gmt":"2013-02-25T16:05:42","slug":"html5-history-api%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6","status":"publish","type":"post","link":"https:\/\/www.webcyou.com\/?p=4329","title":{"rendered":"HTML5 History API\u306b\u3064\u3044\u3066"},"content":{"rendered":"<h4>History API\u3068\u306f<\/h4>\n<p><strong>History API\u306fHTML5\u306e\u6a5f\u80fd\u306e\u3072\u3068\u3064<\/strong>\u3068\u306a\u308a\u307e\u3059\u3002History\u3068\u306f<strong>\u5c65\u6b74<\/strong>\u306e\u3053\u3068\u3067\u3001<strong>history<\/strong>\u3068\u3044\u3046\u540d\u524d\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u5b58\u5728\u3057\u307e\u3059\u3002<\/p>\n<p>\u30d6\u30e9\u30a6\u30b6\u306e\u623b\u308b\u9032\u3080\u30dc\u30bf\u30f3\u306e\u30a4\u30d9\u30f3\u30c8\u3092\u53d6\u5f97\u3057\u3066\u30da\u30fc\u30b8\u306e\u5185\u5bb9\u3092\u52d5\u7684\u306b\u5909\u3048\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3082\u306e\u3067\u3059\u3002<\/p>\n<p>\u307e\u305a\u3001<strong>history<\/strong>\u306b\u3064\u3044\u3066\u306a\u3093\u3067\u3059\u304c\u3001history\u81ea\u4f53\u306f\u6614\u304b\u3089\u3042\u308a\u3001\u3044\u304f\u3064\u304b\u30e1\u30bd\u30c3\u30c9\u3092\u6301\u3064\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u3057\u305f\u3002\u3088\u304f\u4f7f\u308f\u308c\u3066\u3044\u308b\u30e1\u30bd\u30c3\u30c9\u306e\u4e00\u3064\u306b<strong>history.back<\/strong>\u304c\u5b58\u5728\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">history.back();<\/pre>\n<p>\u3067\u306f\u5b9f\u969b\u306b\u7528\u610f\u3057\u307e\u3057\u305f\u306e\u3067\u62bc\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002\u4ee5\u4e0b\u306e\u30dc\u30bf\u30f3\u3092\u62bc\u3059\u3068\u4e00\u3064\u524d\u306b\u898b\u305f\u30da\u30fc\u30b8\u3068\u623b\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p><input onclick=\"history.back()\" type=\"button\" value=\"\u623b\u308b\" \/><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">&lt;input onclick=&quot;history.back()&quot; type=&quot;button&quot; value=&quot;\u623b\u308b&quot; \/&gt;<\/pre>\n<p><strong>\u300c\u623b\u308b\u300d<\/strong>\u3068\u306f\u9006\u306b<strong>\u300c\u9032\u3080\u300d<\/strong>\u5834\u5408\u306f<strong>history.forward()<\/strong>\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u5f15\u6570\u3092\u4e0e\u3048\u3001\u4efb\u610f\u306e\u6570\u3060\u3051\u9032\u3093\u3060\u308a\u623b\u3063\u305f\u308a\uff082\u3064\u5148\u306b\u9032\u3080\u30013\u3064\u524d\u306b\u623b\u308b\u7b49\uff09\u884c\u3046\u5834\u5408\u306b\u5229\u7528\u3059\u308b<strong>history.go<\/strong>\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">history.go(2);\r\nhistory.go(-3);<\/pre>\n<p>history.go(2);\u306e\u3088\u3046\u306b<strong>\u6b63\u306e\u6570\u5024\u306f\u300c\u9032\u3080\u300d<\/strong>history.go(-3);\u306e\u69d8\u306b<strong>\u8ca0\u306e\u6570\u5024\u306f\u300c\u623b\u308b\u300d<\/strong>\u3068\u306a\u308a\u307e\u3059\u3002\u4e0a\u8a18\u306e\u4f8b\u3060\u3068\u30012\u3064\u9032\u3080\u30683\u3064\u623b\u308b\u3002\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<h4>\u5c65\u6b74\u306e\u8ffd\u52a0\uff1a\u30b9\u30bf\u30c3\u30af<\/h4>\n<p>\u305d\u308c\u3067\u306f\u672c\u984c\u306b\u3002HTML5\u306b\u306a\u308a\u3001\u65b0\u6a5f\u80fd\u3068\u3057\u3066\u8ffd\u52a0\u3055\u308c\u305f\u306e\u306f<strong>\u5c65\u6b74\u306e\u8ffd\u52a0<\/strong>\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u30d6\u30e9\u30a6\u30b6\u306e\u5c65\u6b74\u306e<strong>\u4e00\u3064\u4e00\u3064\u306e\u8a18\u9332\u3092\u30b9\u30bf\u30c3\u30af<\/strong>\u3068\u3044\u3044\u3001<strong>\u4e00\u3064\u5c65\u6b74\u304c\u5897\u3048\u308b\u5ea6\u306b\u30b9\u30bf\u30c3\u30af\u304c\u5897\u3048\u308b<\/strong>\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><strong>HistoryAPI<\/strong>\u3092\u4f7f\u3046\u3068\u3053\u306e\u30b9\u30bf\u30c3\u30af\u3092\u30da\u30fc\u30b8\u63a8\u79fb\u3092\u884c\u308f\u306a\u304f\u3066\u3082\u8ffd\u52a0\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u308c\u3067\u306f\u5b9f\u969b\u306b\u5c65\u6b74\u306e\u8ffd\u52a0\u3092\u884c\u3044\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><input onclick=\"history.pushState(null,'history-test','\/history-test')\" type=\"button\" value=\"\u5c65\u6b74\u3092\u8ffd\u52a0\" \/><\/p>\n<p>\u4e0a\u8a18\u306e\u30dc\u30bf\u30f3\u3092\u62bc\u3059\u3068\u3001URL\u306e\u90e8\u5206\u304c<\/p>\n<p><strong>https:\/\/www.webcyou.com\/history-test<\/strong><\/p>\n<p>\u3068\u306a\u308b\u306e\u304c\u78ba\u8a8d\u3067\u304d\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u5b9f\u969b\u3001URL\u306e\u30da\u30fc\u30b8\u3092\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3059\u3068\u3001<strong>\u30da\u30fc\u30b8\u3068\u3057\u3066\u306f\u5b58\u5728\u3057\u306a\u3044<\/strong>\u72b6\u614b\u306a\u306e\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u30d6\u30e9\u30a6\u30b6\u3067\u300c\u623b\u308b\u300d\u3092\u3084\u3063\u3066\u307f\u307e\u3057\u3087\u3046\u3002\u307e\u305f\u3082\u30da\u30fc\u30b8\u304c\u5909\u308f\u3089\u305a\u306b\u3001URL\u304c\u5143\u306e\u3088\u3046\u306b\u623b\u3063\u305f\u3068\u601d\u3044\u307e\u3059\u3002\u3064\u307e\u308a\u3001\u3053\u308c\u304c\u610f\u5473\u3059\u308b\u306e\u306f\u3001\u3053\u306e\u30dc\u30bf\u30f3\u306b\u3088\u3063\u3066\u3001\u5b9f\u969b\u306b\u30da\u30fc\u30b8\u304c\u5909\u308f\u3063\u305f\u308f\u3051\u3067\u306f\u306a\u3044\u3051\u308c\u3069\u3082<strong>\u5c65\u6b74\u304c\u8ffd\u52a0\u3055\u308c\u305f<\/strong>\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002\u300c\u9032\u3080\u300d\u3092\u62bc\u3057\u3066\u307f\u308b\u3068\u307e\u305fURL\u304c\u5909\u308f\u308b\u306f\u305a\u3067\u3059\u3002<\/p>\n<p>\u3053\u306e\u3088\u3046\u306b\u5c65\u6b74\uff08\u30b9\u30bf\u30c3\u30af\uff09\u3092\u8ffd\u52a0\u3059\u308b\u30e1\u30bd\u30c3\u30c9\u306fhistory.pushState\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><strong>history.pushState<\/strong><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">history.pushState(null,'history-test','\/history-test')<\/pre>\n<p><strong>history.pushState(<\/strong>)\u306b\u306f\u30013\u3064\u306e\u5f15\u6570\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u3053\u306e\u6642\u306e\u300c<strong>\u7b2c\u4e00\u5f15\u6570\u306fstate<\/strong>\u300d\u3067\u3042\u308a\u3001\u3053\u308c\u306f\u305d\u306e\u5c65\u6b74\u3068\u95a2\u9023\u4ed8\u3051\u3089\u308c\u305f\u60c5\u5831\u3068\u306a\u308a\u3001\u300c<strong>\u7b2c\u4e8c\u5f15\u6570\u306f\u30bf\u30a4\u30c8\u30eb<\/strong>\u300d\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u3053\u306e<strong>\u7b2c\u4e00\u5f15\u6570\u3001\u7b2c\u4e8c\u5f15\u6570\u306f\u7701\u7565\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u306a\u3044\u305f\u3081<\/strong>\u3001<strong>\u300cnull\u300d\u306e\u5024<\/strong>\u3092\u5165\u308c\u3066\u304a\u308a\u307e\u3059\u3002<\/p>\n<p>\u6700\u5f8c\u306e<strong>\u7b2c\u4e09\u5f15\u6570\u3060\u3051\u7701\u7565\u53ef\u80fd<\/strong>\u3067\u3042\u308a\u3001\u5024\u306f\u5909\u66f4\u3059\u308bURL\u3068\u306a\u3063\u3066\u3044\u308b\u3053\u3068\u304c\u308f\u304b\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u3002<strong>\u7701\u7565\u3057\u305f\u5834\u5408\u3001URL\u306f\u304b\u308f\u3089\u305a\u5c65\u6b74\uff08\u30b9\u30bf\u30c3\u30af\uff09\u3060\u3051\u304c\u8ffd\u52a0<\/strong>\u3055\u308c\u308b\u3053\u3068\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<h4>\u623b\u308b\u30fb\u9032\u3080\u30a4\u30d9\u30f3\u30c8\u3092\u76e3\u8996<\/h4>\n<p>\u3055\u3066\u3001\u3053\u306e<strong>History API<\/strong>\u306a\u3093\u3067\u3059\u304c\u3001\u5c65\u6b74\u3092\u8ffd\u52a0\u3057\u3066\u679c\u305f\u3057\u3066\u4f55\u306e\u5f79\u306b\u7acb\u3064\u306e\u304b\u3063\u3066\u3068\u3053\u308d\u304b\u3068\u601d\u3044\u307e\u3059\u304c\u3001\u8ffd\u52a0\u3059\u308b\u3060\u3051\u3067\u306f\u4f7f\u3044\u9053\u3082\u5fae\u5999\u306a\u306e\u3067\u3001\u5c65\u6b74\u3092\u79fb\u52d5\u3057\u305f\u3002\u3068\u3044\u3046\u30a4\u30d9\u30f3\u30c8\u3092\u53d6\u5f97\u3067\u304d\u308b<strong>popstate\u30a4\u30d9\u30f3\u30c8<\/strong>\u3068\u7d44\u307f\u5408\u308f\u305b\u3066\u5229\u7528\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">window.addEventListener('popstate', function(e) {\r\n},false);<\/pre>\n<p>\u4e0a\u8a18\u306epopstate\u3067\u79fb\u52d5\u3057\u305f\u969b\u306b\u30a4\u30d9\u30f3\u30c8\u3092\u53d6\u5f97\u3057\u3001\u5148\u307b\u3069\u8ffd\u52a0\u3057\u305fstate\u306b\u3001\u5c65\u6b74\u306b\u95a2\u9023\u4ed8\u3051\u3089\u308c\u305f\u60c5\u5831\u304c\u30a4\u30d9\u30f3\u30c8\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e<strong>state\u30d7\u30ed\u30d1\u30c6\u30a3<\/strong>\u306b\u5165\u3063\u3066\u3044\u307e\u3059\u3002\u4e0a\u8a18\u306e\u5834\u5408\u3060\u3068e.state\u3068\u306a\u308a\u307e\u3059\u3002\u3053\u308c\u3092\u7528\u3044\u3066\u3069\u3046\u3044\u3046\u5c65\u6b74\u304b\u5224\u5225\u53ef\u80fd\u3068\u306a\u3063\u3066\u304a\u308a\u307e\u3059\u3002<\/p>\n<h4>\u4f7f\u7528\u7b87\u6240<\/h4>\n<p>\u4f7f\u308f\u308c\u308b\u7b87\u6240\u306a\u3093\u3067\u3059\u304c\u3001\u30bf\u30d6\u30e1\u30cb\u30e5\u30fc\u304c\u3042\u308b\u30da\u30fc\u30b8\u306a\u3093\u304b\u3067\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u30c7\u30e2\u30da\u30fc\u30b8\u3067\u306f\u3001\u30bf\u30d6\u30e1\u30cb\u30e5\u30fc\u304c\u30af\u30ea\u30c3\u30af\u3055\u308c\u305f\u6642\u306b\u3001<strong>history.pushState()<\/strong>\u3067\u5c65\u6b74\u3092\u8ffd\u52a0\u3057\u3001\u5c65\u6b74\u3092\u79fb\u52d5\u3057\u305f\u969b\u306f\u3001<strong>popstate<\/strong>\u3067\u30a4\u30d9\u30f3\u30c8\u3092\u53d6\u5f97\u3057\u3001<strong>e.state<\/strong>\u3067<strong>state\u30d7\u30ed\u30d1\u30c6\u30a3<\/strong>\u3092\u53d6\u5f97\u3057\u3001\u8a72\u5f53\u3059\u308b\u30bf\u30d6\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u8868\u793a\u3055\u305b\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><a href=\"http:\/\/webcyou.com\/demo\/js\/history\/history.html\" target=\"_blank\"><strong>\u30c7\u30e2\u30da\u30fc\u30b8<\/strong><\/a><\/p>\n<p><a href=\"http:\/\/webcyou.com\/demo\/js\/history\/history.html\" target=\"_blank\">http:\/\/webcyou.com\/demo\/js\/history\/history.html<\/a><\/p>\n<p><a href=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/b3ba5343d3debf165f19f01785c4be25.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/b3ba5343d3debf165f19f01785c4be25.png\" title=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2013-02-26 0.46.12\" width=\"499\" height=\"443\" class=\"alignnone  wp-image-4356\" srcset=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/b3ba5343d3debf165f19f01785c4be25.png 624w, https:\/\/www.webcyou.com\/wp-content\/uploads\/b3ba5343d3debf165f19f01785c4be25-300x266.png 300w\" sizes=\"auto, (max-width: 499px) 100vw, 499px\" \/><\/a><\/p>\n<h4>history<\/h4>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">history.state<\/pre>\n<p>\u73fe\u5728\u306estate\u3092\u78ba\u8a8d\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">history.back()<\/pre>\n<p>\u4e00\u3064\u524d\u306e\u5c65\u6b74\u306b\u623b\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">history.forward()<\/pre>\n<p>\u4e00\u3064\u5148\u306e\u5c65\u6b74\u306b\u9032\u307f\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">history.go(num)<\/pre>\n<p>\u6307\u5b9a\u3057\u305f\u5c65\u6b74\u3078\u30b8\u30e3\u30f3\u30d7\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">history.length<\/pre>\n<p>\u73fe\u5728\u306e\u5c65\u6b74\u306e\u6570\u3092\u8868\u793a\u3002<\/p>\n<h4>location\u30cf\u30c3\u30b7\u30e5<\/h4>\n<p>\u307e\u305f\u624b\u8efd\u3055\u3068\u3044\u3048\u3070<strong>\u30cf\u30c3\u30b7\u30e5\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u304c\u624b\u8efd\u304b\u3068\u601d\u3044\u307e\u3059<\/strong>\u3002\u30cf\u30c3\u30b7\u30e5\u3068\u306f\u3001<strong>https:\/\/www.webcyou.com\/index.html#hogege<\/strong>\u3068\u3044\u3046\u3088\u3046\u306a\u3001\u300c#\u300d\u3092\u30cf\u30c3\u30b7\u30e5\u30bf\u30b0\u3068\u3044\u3044\u3001\u300c#\u300d\u4ee5\u964d\u306e\u90e8\u5206\u3092\u7528\u3044\u308b\u3053\u3068\u3067\u3059\u3002<\/p>\n<p>Javascript\u3067\u306f\u3001<strong>location\u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong>\u3092\u4f7f\u3044\u3001\u3053\u306e\u30cf\u30c3\u30b7\u30e5\u3092\u7528\u3044\u305f\u64cd\u4f5c\u3092\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><strong>location\u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong>\u3082\u3001\u53e4\u304f\u304b\u3089\u3042\u308a<strong>URL<\/strong>\u3092\u6271\u3046\u306e\u306b\u7528\u3044\u3089\u308c\u307e\u3059\u3002\u73fe\u5728\u306eURL\u3092\u53d6\u5f97\u3059\u308blocation.href\u306a\u3069\u304c\u3088\u304f\u4f7f\u308f\u308c\u3066\u3044\u308b\u306e\u3067\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002\u3053\u306e<strong>location.href<\/strong>\u306f\u5024\u3092\u4ee3\u5165\u3059\u308b\u3068\u3001\u305d\u306e\u30da\u30fc\u30b8\u3078\u79fb\u52d5\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u30cf\u30c3\u30b7\u30e5\u306e\u90e8\u5206\u3060\u3051\u3092\u5909\u66f4\u3059\u308b\u969b\u306f\u3001location.hash\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u5148\u7a0b\u306elocation.hash\u306b\u306f&#8221;#hogege&#8221;\u3068\u5165\u3063\u3066\u3044\u307e\u3059\u304c\u3001\u3053\u308c\u306b\u4ee3\u5165\u3057\u3066\u5909\u66f4\u3059\u308b\u3068\u3001pushState\u540c\u69d8\u306b<strong>URL\u3092\u3078\u3093\u3053\u3046\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059<\/strong>\u3002<strong>\u5c65\u6b74\u306b\u3082\uff08\u30b9\u30bf\u30c3\u30af\uff09\u8ffd\u52a0\u3055\u308c\u307e\u3059\u3002<\/strong>\u5c65\u6b74\u306b\u5165\u308b\u3068\u3044\u3046\u3053\u3068\u306f\u3001<strong>popState<\/strong>\u3082\u4f7f\u3048\u308b\u3068\u3044\u3046\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u5148\u307b\u3069\u306e\u30bf\u30d6\u306e\u4f8b\u3092\u3001<strong>pushState\u3067\u306f\u306a\u304flocation.hash<\/strong>\u3092\u7528\u3044\u308b\u3088\u3046\u306b\u5909\u66f4\u3057\u305f\u30c7\u30e2\u30da\u30fc\u30b8<\/p>\n<p>\u3053\u308c\u306f\u3001pushState\u306e\u90e8\u5206\u304clocation.hash\u3078\u306e\u4ee3\u5165\u306b\u306a\u308a\u3001popState\u30a4\u30d9\u30f3\u30c8\u306e\u307b\u3046\u3082location.hash\u3092\u8abf\u3079\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u3053\u3067\u6ce8\u76ee\u3059\u3079\u304d\u3053\u3068\u306f\u3001<strong>popState\u304c\u547c\u3073\u51fa\u3055\u308c\u305f\u6642\u70b9\u3067location\u306eURL\u60c5\u5831\u306f\u5c65\u6b74\u79fb\u52d5\u5f8c\u306e\u3082\u306e\u306b\u306a\u3063\u3066\u3044\u308b<\/strong>\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002\u3067\u3059\u304b\u3089\u3001\u4f8b\u3048\u3070pushState\u306e\u7b2c\u4e09\u5f15\u6570\u306bURL\u3092\u6307\u5b9a\u3057\u305f\u5834\u5408\u3001location.href\u3092\u8abf\u3079\u308b\u3053\u3068\u3067URL\u3092\u3082\u3068\u306b\u3057\u305f\u51e6\u7406\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h4>hashchange\u30a4\u30d9\u30f3\u30c8<\/h4>\n<p>popstate\u3068\u4f3c\u305f\u30a4\u30d9\u30f3\u30c8\u3068\u3057\u3066\u3001<strong>\u30cf\u30c3\u30b7\u30e5\u3060\u3051\u304c\u5909\u66f4\u3057\u305f\u969b<\/strong>\u306b\u767a\u751f\u3059\u308b<strong>hashchange\u30a4\u30d9\u30f3\u30c8<\/strong>\u3082\u5b58\u5728\u3057\u307e\u3059\u3002\u30cf\u30c3\u30b7\u30e5\u306e\u307f\u304c\u5909\u66f4\u3057\u305f\u969b\u306a\u306e\u3067<strong>pushState\u306e\u7b2c\u4e09\u5f15\u6570\u306b\u3088\u3063\u3066URL\u3082\u5909\u308f\u3063\u3066\u3057\u307e\u3063\u305f\u5834\u5408\u306e\u5c65\u6b74\u79fb\u52d5\u306a\u3069\u3067\u306f\u767a\u751f\u3057\u306a\u3044\u30a4\u30d9\u30f3\u30c8<\/strong>\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><strong>hashchange\u30a4\u30d9\u30f3\u30c8\u306e\u30a4\u30d9\u30f3\u30c8\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u306foldURL\u3068newURL\u3068\u3044\u30462\u3064\u306e\u30d7\u30ed\u30d1\u30c6\u30a3<\/strong>\u304c\u5b58\u5728\u3057\u3001\u79fb\u52d5\u5143\u30fb\u79fb\u52d5\u5f8c\u306eURL\u3092\u4e21\u65b9\u53d6\u5f97\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3068\u306a\u3063\u3066\u304a\u308a\u307e\u3059\u3002<\/p>\n<p>hashchange\u30a4\u30d9\u30f3\u30c8\u3092\u7528\u3044\u305f\u30c7\u30e2\u30da\u30fc\u30b8\u306f\u4ee5\u4e0b\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><a href=\"http:\/\/webcyou.com\/demo\/js\/history\/history2.html\" target=\"_blank\"><strong>\u30c7\u30e2\u30da\u30fc\u30b8<\/strong><\/a><\/p>\n<p><a href=\"http:\/\/webcyou.com\/demo\/js\/history\/history2.html\" target=\"_blank\">http:\/\/webcyou.com\/demo\/js\/history\/history2.html<\/a><\/p>\n<p><a href=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/b3ba5343d3debf165f19f01785c4be25.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/b3ba5343d3debf165f19f01785c4be25.png\" title=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2013-02-26 0.46.12\" width=\"499\" height=\"443\" \/><\/a><\/p>\n<h4>location<\/h4>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">location.href<\/pre>\n<p>\u6307\u5b9a\u3057\u305fURL\u3078\u30b8\u30e3\u30f3\u30d7<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">location.protocol<\/pre>\n<p>\u73fe\u5728\u30da\u30fc\u30b8URL\u306e\u30d7\u30ed\u30c8\u30b3\u30eb\uff08\u901a\u4fe1\u624b\u6bb5\uff09\u3092\u53d6\u5f97<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">location.hostname<\/pre>\n<p>\u73fe\u5728\u30da\u30fc\u30b8URL\u306e\u30db\u30b9\u30c8\u540d\u3092\u53d6\u5f97<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">location.pathname<\/pre>\n<p>\u73fe\u5728\u306e\u30c9\u30e1\u30a4\u30f3\u3092\u8997\u3044\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30d1\u30b9\u3092\u53d6\u5f97\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">location.search<\/pre>\n<p>\u73fe\u5728\u306eURL\u306e?\u306e\u5f8c\u308d\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u53d6\u5f97<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">location.hash<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>History API\u3068\u306f History API\u306fHTML5\u306e\u6a5f\u80fd\u306e\u3072\u3068\u3064\u3068\u306a\u308a\u307e\u3059\u3002History\u3068\u306f\u5c65\u6b74\u306e\u3053\u3068\u3067\u3001history\u3068\u3044\u3046\u540d\u524d\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u5b58\u5728\u3057\u307e\u3059\u3002 \u30d6\u30e9\u30a6\u30b6\u306e\u623b\u308b\u9032\u3080\u30dc\u30bf\u30f3\u306e\u30a4\u30d9\u30f3\u30c8\u3092\u53d6\u5f97\u3057\u3066\u30da [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30],"tags":[176,166,37,47,46],"class_list":["post-4329","post","type-post","status-publish","format-standard","hentry","category-html5","tag-html5","tag-iphone","tag-iphone-","tag-javascript-2","tag-js"],"_links":{"self":[{"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/posts\/4329","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4329"}],"version-history":[{"count":30,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/posts\/4329\/revisions"}],"predecessor-version":[{"id":4360,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/posts\/4329\/revisions\/4360"}],"wp:attachment":[{"href":"https:\/\/www.webcyou.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4329"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4329"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4329"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}