var params = (function(){ var tmp = location.search.split("?")[1]; if( !tmp ) return {}; var result = {}; tmp.split("&").forEach(function(v){var w=v.split("=");result[w[0]]=w[1];}); return result; })(); Register as a new user and use Qiita more conveniently You get articles that match your needsYou can efficiently read back useful informationWhat you can do with signing up