Use a Custom Label in a Custom Link/Button

That should work fine. I just tested in my org with a custom label called Label with the following Javascript on a custom button:

alert('{!$Label.Label}');

The text I had set up was 'Sample' and when I clicked the custom button on my object it correctly alerted the word Sample.

Are you experiencing something different?


This will work, since before displaying web page, all labels tags -

("{!$Label.labelName}")

will be replaced with text values. On page load, javascript will be executed with text values.

Although in your example, I would consider using custom settings for storing variables such as target host.