Skip to content

Instantly share code, notes, and snippets.

@baranga
Created January 8, 2013 09:34
Show Gist options
  • Select an option

  • Save baranga/4482475 to your computer and use it in GitHub Desktop.

Select an option

Save baranga/4482475 to your computer and use it in GitHub Desktop.

Revisions

  1. baranga created this gist Jan 8, 2013.
    19 changes: 19 additions & 0 deletions location_hash_test.html
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>location hash test</title>
    </head>
    <body>
    <h1>location hash test</h1>
    <dl>
    <dt>hash</dt>
    <dd><code id="hashOutput"></code></dd>
    </dl>
    <script>
    var hash = window.location.hash || location.hash,
    output = document.getElementById('hashOutput');
    output.innerHTML = hash;
    </script>
    </body>
    </html>