From PHP to JavaScript: execute $_SERVER[‘HTTP_HOST’]

Here is a php script:

<?php
echo 'http://counter.yadro.ru/logo;'.$_SERVER['HTTP_HOST'].'?29.1';
?>

How to implement the same in javascript?


Answer 1, authority 100%

<html>
  <body>
    <script type="text/javascript">
        document.write('http://counter.yadro.ru/logo;' + window.location.host + '?29.1');
    </script>
  </body>
</html>