I have a URL http://www.test.com/us/abc/
my CMS only accept html and javascript
Is it possible using javascript to get this current url. and then get "us" parameter and put it in if else statement?
If "us" detected, echo out "US website". If "ca" detected, echo out "Canada website".
Thanks
<p id="demo"></p>
<script>
document.getElementById("demo").innerHTML =
window.location.href;
</script>