url: http://www.xxxxxx.com/game/index.html#/?key=5161565
function getQueryString(name: string) {
// var result = window.location.search.match(new RegExp("[\?\&]" + name + "=([^\&]+)", "i"));
var result = window.location.href.match(new RegExp("[\?\&]" + name + "=([^\&]+)", "i"));
if (result == null || result.length < 1) {
return "";
}
return result[1];
}
getQueryString('key'); // 5161565