Jump to content
  • Sign Up

maxim1o

Neophyte
  • Content Count

    2
  • Joined

  • Last visited

Community Reputation

0 Обычная

About maxim1o

  • Rank
    Новичок

Information

  • Sex
    не скажу
  1. http://site.ru/ru/example.html Для смены языка на сайте нужно в адресе например /ru/ заменить на /us/ текущий адрес узнаю так <a id="demo"></a> <script> document.getElementById("demo").href= "http://site.ru/us/" + window.location.pathname; </script> Как получить только последнюю часть url?
  2. Для смены языка на сайте нужно в адрес добавить например /ru/ текущий адрес узнаю так <p id="demo"></p> <script> document.getElementById("demo").innerHTML = "http://site.ru/ru/" + window.location.pathname; </script> но оно выдает текстом Вопрос: как сделать чтобы это была ссылка?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy