module 용 js 로 생성
getParameter.js
export function getParameter(name) {
const urlParams = new URLSearchParams(window.location.search);
const value = urlParams.get(name);
console.log(`getParameter("${name}") 결과:`, value); // 디버깅용 추가
return value;
}
'JavaScript' 카테고리의 다른 글
| [풀페이지 fullPage] (0) | 2020.07.22 |
|---|---|
| [스와이퍼 Swiper] (0) | 2020.07.22 |
| [슬릭 Slick] (0) | 2020.07.22 |
| [슬릭그리드 SlickGrid] (0) | 2020.07.22 |