JavaScript Reference/Javascript Properties/domain

Материал из Web эксперт
Перейти к: навигация, поиск

"domain" Example

   <source lang="javascript">
   

<html> <body> <script language="JavaScript"> function function1() {

   var m = document.domain;
   if (m) {
       alert(m);
   } else {
       alert("No security domain");
   }

} </script> <input type="button" onClick="function1();" value="Domain Name"> </body> </html>


     </source>
   
  


"domain" is applied to

   <source lang="javascript">

+----------------+--------------------------------------------------------------+ | Applied_To |document | +----------------+--------------------------------------------------------------+

     </source>
   
  


"domain" Syntax and Note

   <source lang="javascript">

Note: Read and write property. Sets the document security domain name.

Syntax:

document.domain = value


     </source>