JavaScript Reference/Javascript Properties/returnValue

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

"returnValue" Example

   <source lang="javascript">
   

<html> <body> <script language="JavaScript">

   function function1() {
       event.returnValue = false;
   }

</script> <a id="function1"

  href="http://www.wbex.ru" 
  target="_blank" 
  onClick="function1();">wbex.ru Home page</a>
   
     
     </source>
   
  


"returnValue" is applied to

   <source lang="javascript">

+----------------+--------------------------------------------------------------+ | Applied_To |event window | +----------------+--------------------------------------------------------------+

     </source>
   
  


"returnValue" Syntax and Note

   <source lang="javascript">

Note: Read and write property. It sets the return value of the event (if false, the action is canceled). For the window object, it specifies the value of a modal dialog window.

Syntax:

window.event.returnValue = value window.returnValue = value


     </source>