JSFiddle - React, Tailwind, and code Playground
by Park Mino
JavaScript
var _url = document.location.href.split("/"),
_urlPara = _url[4-1].split("."),
_urlParaCate = _urlPara[0];
if(_urlParaCate == 'SubMain01' || _urlParaCate == 'SubMain02' || _urlParaCate == 'customer' ){
console.log('123 : 9')
location.href = "tel:9";
}else if(_urlParaCate == 'Page'){
var _pagePara = _url[4-1].split("="),
_pageParaCate = _pagePara[1].substring(0, 2);
if(_pageParaCate=='A0' || _pageParaCate =='B0' || _pageParaCate =='C0' || _pageParaCate =='D0' || _pageParaCate =='E0' || _pageParaCate =='F0'){
console.log('123 : 9')
location.href = "tel:9";
}
}else if(_urlParaCate == "Main" && GnbTelChange =="B1"){
console.log('Main : 9')
location.href = "tel:9";
}else{
console.log('그외 : 8')
location.href = "tel:8";
}