location.hostname()

We can get the hostname of the current page by using location object , Here is the example.
location.hostname();
Sample code is here.
<script language='JavaScript' type='text/JavaScript'>
<!--
document.write(location.hostname);

//-->
</script>
The output is here

Subscribe

* indicates required
Subscribe to plus2net

    plus2net.com




    Post your comments , suggestion , error , requirements etc here .




    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2021 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer