Jump to content

polonez

Newbie
  • Posts

    1
  • Joined

  • Last visited

polonez's Achievements

Explorer

Explorer (1/14)

0

Reputation

  1. Доброе время всем! Помогите пожалуйста решить такую проблему. Есть скрипт который находит в куках значение переменной и передает ее. Вот этот скрипт function readCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return null; } function getRef() { ref = document.referrer; re = /(?|&)(q|p)=([^&]*)/; searchq = re.exec(ref); if(searchq) { __utmSetVar(searchq[3]); } } function sleuth() { if (document.cookie.indexOf("__utmz=") != -1) { z = readCookie('__utmz'); za = z.split('|'); t = za[0].split('.'); za[0] = t[t.length - 1]; for (i = 0; i < za.length; i++) { t2 = za[i].split('='); if (t2[0] == 'utmgclid' || t2[1] == 'cpc' || t2[1] == 'ppc') { getRef(); } } } } информацию нужную он находит, а вот результат выдает вот в таком виде: %D0%BA%D0%BE%D0%BD%D1%82%D0%B5%D0%BA%D1%81%D1%82%D0%BD%D0%B0%D1%8F+%D1%80%D0%B5%D0%BA%D0%BB%D0%B0%D0%BC%D0 %B0+%D0%BC%D0%B8%D0%BD%D0%B8%D0%BC%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B9+%D0%B4%D0%B5%D0%BF%D0%BE%D0%B7%D0 %B8%D1%82 Помогите решить эту проблему. Заранее благодарен.
×
×
  • 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