{"id":2583,"date":"2025-07-29T05:59:25","date_gmt":"2025-07-29T05:59:25","guid":{"rendered":"https:\/\/satokotadesign.com\/blog\/?p=2583"},"modified":"2025-07-29T05:59:25","modified_gmt":"2025-07-29T05:59:25","slug":"history-back","status":"publish","type":"post","link":"https:\/\/satokotadesign.com\/blog\/history-back\/","title":{"rendered":"JavaScript\u3067\u7c21\u5358\u306b\u4f5c\u308c\u308b\u300c\u623b\u308b\u300d\u30dc\u30bf\u30f3\u5b9f\u88c5\u30ac\u30a4\u30c9\uff5c\u5c65\u6b74\u304c\u306a\u3044\u5834\u5408\u306e\u5bfe\u7b56\u3082\u89e3\u8aac"},"content":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\uff01\u9759\u5ca1\u770c\u6d5c\u677e\u5e02\u3067WEB\u30c7\u30b6\u30a4\u30ca\u30fc\u3092\u3057\u3066\u3044\u307e\u3059\u5c0f\u7027\u3067\u3059\u3002<\/p>\n<p>Web\u5236\u4f5c\u3092\u3057\u3066\u3044\u308b\u3068\u3001<span class=\"sc_marker-animation\">\u300c\u623b\u308b\u300d\u30dc\u30bf\u30f3\u3092\u30da\u30fc\u30b8\u5185\u306b\u914d\u7f6e\u3057\u305f\u3044\u5834\u9762\u3063\u3066\u610f\u5916\u3068\u591a\u304f\u306a\u3044\u3067\u3059\u304b\uff1f<\/span><\/p>\n<p>\u4f8b\u3048\u3070\u3001\u8a73\u7d30\u30da\u30fc\u30b8\u3084\u304a\u554f\u3044\u5408\u308f\u305b\u30d5\u30a9\u30fc\u30e0\u306e\u78ba\u8a8d\u753b\u9762\u306a\u3069\u3001\u30d6\u30e9\u30a6\u30b6\u6a19\u6e96\u306e\u623b\u308b\u64cd\u4f5c\u3067\u306f\u306a\u304f\u3001\u30b5\u30a4\u30c8\u30c7\u30b6\u30a4\u30f3\u306b\u5408\u308f\u305b\u305f\u30dc\u30bf\u30f3\u3092\u8a2d\u7f6e\u3057\u305f\u3044\u3068\u304d\u3002<\/p>\n<p>\u5b9f\u306f\u3053\u306e\u300c\u623b\u308b\u300d\u30dc\u30bf\u30f3\u3001JavaScript\u306e<span class=\"sc_marker-animation\"> history.back() <\/span>\u3092\u4f7f\u3048\u3070\u305f\u3063\u305f1\u884c\u3067\u5b9f\u88c5\u3067\u304d\u308b\u3093\u3067\u3059\u3002<br \/>\n\u3057\u304b\u3082\u3001\u30ea\u30f3\u30af\u30bf\u30b0\u3084\u30dc\u30bf\u30f3\u30bf\u30b0\u3069\u3061\u3089\u3067\u3082OK\u3002<\/p>\n<p>\u4eca\u56de\u306f\u3001\u6700\u3082\u30b7\u30f3\u30d7\u30eb\u306a\u30b3\u30fc\u30c9\u4f8b\u304b\u3089\u3001\u30c7\u30b6\u30a4\u30f3\u3092\u6574\u3048\u308bCSS\u3001\u6ce8\u610f\u70b9\u3084\u5fdc\u7528\u30c6\u30af\u30cb\u30c3\u30af\u307e\u3067\u3001<br \/>\n\u307e\u3068\u3081\u3066\u7d39\u4ecb\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<h3 class=\"sc_heading bborder b blue\"><span class=\"sc_title\">\u57fa\u672c\uff1a1\u884c\u3067\u66f8\u3051\u308b\u623b\u308b\u30dc\u30bf\u30f3<\/span><\/h3>\n<p>\u3082\u3063\u3068\u3082\u30b7\u30f3\u30d7\u30eb\u306a\u65b9\u6cd5\u306f\u3001JavaScript\u306e<span class=\"sc_marker-animation\"> history.back() <\/span>\u3092\u76f4\u63a5\u547c\u3073\u51fa\u3059\u65b9\u6cd5\u3067\u3059\u3002<\/p>\n<pre class=\"line-numbers\" ><code class=\"language-markup\">&lt;button onclick=&quot;history.back()&quot;&gt;\u623b\u308b&lt;\/button&gt; &lt;\/code&gt;<\/code><\/pre>\n<p><span class=\"sc_marker-animation\">\u3053\u308c\u3060\u3051\u3067\u524d\u306e\u30da\u30fc\u30b8\u306b\u623b\u308b\u6a5f\u80fd\u304c\u5b8c\u6210!<\/span><\/p>\n<p>\u30ea\u30f3\u30af\u30bf\u30b0\u306b\u3057\u305f\u3044\u5834\u5408\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u66f8\u304d\u63db\u3048\u308b\u3060\u3051\u3067\u3059\u3002<\/p>\n<pre class=\"line-numbers\" ><code class=\"language-markup\">&lt;a href=&quot;javascript:history.back()&quot;&gt;\u623b\u308b&lt;\/a&gt;<\/code><\/pre>\n<h3 class=\"sc_heading bborder b blue\"><span class=\"sc_title\">\u30c7\u30b6\u30a4\u30f3\u3092\u6574\u3048\u308bCSS<\/span><\/h3>\n<p>\u30b7\u30f3\u30d7\u30eb\u306a\u30dc\u30bf\u30f3\u3092\u3001\u30b5\u30a4\u30c8\u30c7\u30b6\u30a4\u30f3\u306b\u5408\u308f\u305b\u3066\u8abf\u6574\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p class=\"codepen\" data-height=\"300\" data-default-tab=\"html,result\" data-slug-hash=\"jEbVmZo\" data-pen-title=\"Untitled\" data-user=\"ekwwawpb-the-styleful\" style=\"height: 300px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid; margin: 1em 0; padding: 1em;\">\n  <span>See the Pen <a href=\"https:\/\/codepen.io\/ekwwawpb-the-styleful\/pen\/jEbVmZo\"><br \/>\n  Untitled<\/a> by \u5c0f\u7027\u8ce2 (<a href=\"https:\/\/codepen.io\/ekwwawpb-the-styleful\">@ekwwawpb-the-styleful<\/a>)<br \/>\n  on <a href=\"https:\/\/codepen.io\">CodePen<\/a>.<\/span>\n<\/p>\n<p><script async src=\"https:\/\/public.codepenassets.com\/embed\/index.js\"><\/script><\/p>\n<h3 class=\"sc_heading bborder b blue\"><span class=\"sc_title\">\u6ce8\u610f\u70b9\uff1a\u623b\u308c\u306a\u3044\u5834\u5408\u306e\u6319\u52d5<\/span><\/h3>\n<p><span class=\"sc_marker-animation\">history.back() <\/span>\u306f \u76f4\u524d\u306e\u30da\u30fc\u30b8\u5c65\u6b74\u304c\u3042\u308b\u5834\u5408\u306e\u307f\u6a5f\u80fd\u3057\u307e\u3059\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u3001\u30d6\u30c3\u30af\u30de\u30fc\u30af\u3084\u76f4\u63a5\u30a2\u30af\u30bb\u30b9\u3055\u308c\u305f\u5834\u5408\u306f\u623b\u308c\u306a\u3044\u305f\u3081\u3001\u30c8\u30c3\u30d7\u30da\u30fc\u30b8\u306a\u3069\u3078\u306e\u30d5\u30a9\u30fc\u30eb\u30d0\u30c3\u30af\u30ea\u30f3\u30af\u3092\u7528\u610f\u3059\u308b\u3068\u5b89\u5fc3\u3067\u3059\u3002<\/p>\n<pre class=\"line-numbers\" ><code class=\"language-js\">  if (history.length &gt; 1) {\r\n    history.back();\r\n  } else {\r\n    window.location.href = &quot;\/&quot;;\r\n  }<\/code><\/pre>\n<h2 class=\"sc_heading solid blue\"><span class=\"sc_title\">\u307e\u3068\u3081<\/span><\/h2>\n<div class=\"sc_frame_wrap inline blue\">\n<div class=\"sc_frame_title\">\u623b\u308b\u30dc\u30bf\u30f3\u5b9f\u88c5\u306e\u30dd\u30a4\u30f3\u30c8<\/div>\n<div class=\"sc_frame\">\n\u30fb\u6700\u77ed1\u884c\u3067\u5b9f\u88c5\u3067\u304d\u308b <span class=\"fontbackground\" style=\"background:;\">history.back()<\/span>\u304c\u57fa\u672c<br \/>\n\u30fb\u30c7\u30b6\u30a4\u30f3\u3092CSS\u3067\u6574\u3048\u308b\u3053\u3068\u3067\u30d6\u30e9\u30f3\u30c9\u611f\u3092\u6f14\u51fa<br \/>\n\u30fb\u5c65\u6b74\u304c\u306a\u3044\u5834\u5408\u306f\u30c8\u30c3\u30d7\u30da\u30fc\u30b8\u3078\u30d5\u30a9\u30fc\u30eb\u30d0\u30c3\u30af\u3059\u308b\u5de5\u592b\u304c\u5fc5\u8981 <\/div>\n<\/p><\/div>\n<p>&nbsp;<\/p>\n<p><figure id=\"attachment_475\" aria-describedby=\"caption-attachment-475\" style=\"width: 1500px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/satokotadesign.com\/\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/satokotadesign.com\/blog\/wp-content\/uploads\/2022\/10\/bnr.jpg\" alt=\"\u9759\u5ca1\u770c\u6d5c\u677e\u5e02\u3067\u30db\u30fc\u30e0\u30da\u30fc\u30b8\u5236\u4f5c\u306a\u3089satokotadesign\" width=\"1500\" height=\"500\" class=\"size-full wp-image-475\" srcset=\"https:\/\/satokotadesign.com\/blog\/wp-content\/uploads\/2022\/10\/bnr.jpg 1500w, https:\/\/satokotadesign.com\/blog\/wp-content\/uploads\/2022\/10\/bnr-500x167.jpg 500w, https:\/\/satokotadesign.com\/blog\/wp-content\/uploads\/2022\/10\/bnr-1024x341.jpg 1024w, https:\/\/satokotadesign.com\/blog\/wp-content\/uploads\/2022\/10\/bnr-768x256.jpg 768w\" sizes=\"auto, (max-width: 1500px) 100vw, 1500px\" \/><\/a><figcaption id=\"caption-attachment-475\" class=\"wp-caption-text\"><a href=\"https:\/\/satokotadesign.com\/contact\/\" target=\"_blank\" rel=\"noopener\">\u9759\u5ca1\u770c\u6d5c\u677e\u5e02\u3067\u30db\u30fc\u30e0\u30da\u30fc\u30b8\u5236\u4f5c\u306a\u3089satokotadesign<\/a><\/figcaption><\/figure><\/p>\n\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\uff01\u9759\u5ca1\u770c\u6d5c\u677e\u5e02\u3067WEB\u30c7\u30b6\u30a4\u30ca\u30fc\u3092\u3057\u3066\u3044\u307e\u3059\u5c0f\u7027\u3067\u3059\u3002 Web\u5236\u4f5c\u3092\u3057\u3066\u3044\u308b\u3068\u3001\u300c\u623b\u308b\u300d\u30dc\u30bf\u30f3\u3092\u30da\u30fc\u30b8\u5185\u306b\u914d\u7f6e\u3057\u305f\u3044\u5834\u9762\u3063\u3066\u610f\u5916\u3068\u591a\u304f\u306a\u3044\u3067\u3059\u304b\uff1f \u4f8b\u3048\u3070\u3001\u8a73\u7d30\u30da\u30fc\u30b8\u3084\u304a\u554f\u3044\u5408\u308f\u305b\u30d5\u30a9\u30fc\u30e0\u306e\u78ba\u8a8d\u753b\u9762\u306a\u3069\u3001\u30d6\u30e9\u30a6\u30b6\u6a19\u6e96\u306e\u623b\u308b\u64cd\u4f5c\u3067\u306f\u2026<\/p>\n","protected":false},"author":1,"featured_media":2588,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[7],"tags":[8],"class_list":["post-2583","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-web","tag-javascript"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/satokotadesign.com\/blog\/wp-json\/wp\/v2\/posts\/2583","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/satokotadesign.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/satokotadesign.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/satokotadesign.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/satokotadesign.com\/blog\/wp-json\/wp\/v2\/comments?post=2583"}],"version-history":[{"count":4,"href":"https:\/\/satokotadesign.com\/blog\/wp-json\/wp\/v2\/posts\/2583\/revisions"}],"predecessor-version":[{"id":2587,"href":"https:\/\/satokotadesign.com\/blog\/wp-json\/wp\/v2\/posts\/2583\/revisions\/2587"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/satokotadesign.com\/blog\/wp-json\/wp\/v2\/media\/2588"}],"wp:attachment":[{"href":"https:\/\/satokotadesign.com\/blog\/wp-json\/wp\/v2\/media?parent=2583"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/satokotadesign.com\/blog\/wp-json\/wp\/v2\/categories?post=2583"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/satokotadesign.com\/blog\/wp-json\/wp\/v2\/tags?post=2583"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}