Answers for "javascript read hash"

0

Javascript check for hash in URL

if (location.href.indexOf("#") != -1) {
    //current url has a #hash in it
}
Posted by: Guest on July-26-2019
0

get hash js

location.hash
Posted by: Guest on July-01-2020
0

How to use hash in javascript

var h = new Object(); // or just {}
h['one'] = 1;
h['two'] = 2;
h['three'] = 3;

// show the values stored
for (var k in h) {
    // use hasOwnProperty to filter out keys from the Object.prototype
    if (h.hasOwnProperty(k)) {
        alert('key is: ' + k + ', value is: ' + h[k]);
    }
}
Posted by: Guest on December-17-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language