📅  最后修改于: 2022-03-11 15:04:32.703000             🧑  作者: Mango
var hash = window.location.hash;
if (hash) {
// Fragment exists
hash = hash.substring(1);
console.log(hash);
} else {
// Fragment doesn't exist
}