Genie: Domainname aus URL

Beitrag lesen

Hi

Wäre schön wenns so wäre, aber
<input type="button" value="test" onclick="alert(ylink.location.hostname);">

<a id="ylink" href="http://yahoo.de?x=1&y=2" onclick="alert(this.location.hostname);return false;">Yahoo</a>

Klappt beides nicht. und wird ja wohl nicht daran liegen,
dass er sichbar ist.

ne, eher an

<a id="ylink" href="http://yahoo.de?x=1&y=2"
onclick="alert(this.location.hostname);return false;">Yahoo</a>

^^^^^^^^
nicht alert(this.location.hostname); sondern alert(this.hostname);

mfg
Genie