SQL PHP HTML ASP JavaScript articles and free scripts to download
JavaScript Document

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.
document.domain
The output for this page will be Here is the code.
<html>
<head>
<title></title>
<script type="text/javascript">
document.write(document.domain);
</script>
</head>
<body>

</body>
</html>

Google+

Post Comment This is for short comments only. Use the forum for more discussions.
Name
Email( not to be displayed)Privacy Policy
1+2=This is to prevent automatic submission by spammers. Please enter the result of the sum as asked

Document Object in JavaScript
Cookies
Last Modified Date of the file



Join Our Email List
Email:  
For Email Newsletters you can trust
HTML . MySQL. PHP. JavaScript. ASP. Photoshop. Articles. FORUM Contact us

©2000-2014 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer