Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I display a domain name?

Status
Not open for further replies.

marcondes

Technical User
Feb 20, 2002
23
0
0
US
Is there a function in JavaScript that allows me to display the current domain name on the screen? i.e.: Welcome to the new home of "domain name"! where "domain name" is the address the person was trying to view.

Thanks
 
something like this?

<script type=&quot;text/javascript&quot;>
document.write(&quot;welcome to &quot; + location.hostname);
</script>




=========================================================
-jeff
try { succeed(); } catch(E) { tryAgain(); }
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top