I have the following:
var hashID = location.hash.match(/\d/);
Where location.hash eqs: #/groups/58
I want hashID to equal = 58
Right now it equals an array. How can I get back j开发者_如何转开发ust 58 as an int? THanks
var hashID = parseInt(location.hash.match(/\d+/)[0])
精彩评论