querystring1 쿼리스트링을 JSON형태로 변환 function getUrlInfo(query) { if (typeof query != “string”) query = location.href; var obj = {}, url = “”, param = “”, qs = query.indexOf(“?”), eq = query.indexOf(“=”), am = query.indexOf(“&”); var min = (eq == -1)? am : ((am == -1)? eq : Math.min(eq,am)); if (qs == -1) { if (eq == -1 && am == -1) url = query; else param = query; }else if (min == -1 || qs < min) { url = query.substring(0,qs); par.. 2014. 3. 18. 이전 1 다음