document.domain of a page

If we are running a script in a website or in our localhost we can find out the domain name of the website by using document.domain property. Say we have developed a script which can work in multiple domains and we need to find out the present domain name for our processing.

Here is the syntax of our domain property of document object.


The output for this page will be Here is the code.

<script type="text/javascript">


Number of User Comments : 1




Thanks very much solve the problem :) God bless you

Post Comment This is for short comments only. Use the forum for more discussions.

HTML . MySQL. PHP. JavaScript. ASP. Photoshop. Articles. FORUM Contact us
©2000-2015 All rights reserved worldwide Privacy Policy Disclaimer