JavaScript Reference/Javascript Methods/releaseCapture

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

"releaseCapture()" Example

   <source lang="javascript">
  

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

  myX.innerHTML = window.event.offsetX;
  myY.innerHTML = window.event.offsetY; 

} function function1() {

  myDiv.setCapture();

} function function2() {

  myDiv.releaseCapture();

} </script>

X Coordinate: 0

Y Coordinate: 0

Click inside the box to disable mouse capture outside the box

<button onclick="function1()">Set capture</button> </body> </html>


     </source>
   
  


"releaseCapture()" is applied to

   <source lang="javascript">

+----------------+--------------------------------------------------------------+ | Applied_To |<a> <address> | | |<applet> <area> | | | |

| |
<body> |

| |
<button> |

| |
|

| | | | |<custom>

| | | <dir> |

| |
|

| |document

| | | <embed> | | |<fieldset> | | |<form> <hn> |

| |
|

| |<img> <input type="button"> | | |<input type="checkbox"> <input type="file"> | | |<input type="hidden"> <input type="image"> | | |<input type="password"> <input type="radio"> | | |<input type="reset"> <input type="submit"> | | |<input type="text"> | | |<label> <legend> |

| |
  • <listing> | | |<map> <marquee> | | |<menu> <nobr> | | |<object>
      | | |<option>

      | | |<plaintext>

                               |
      |                |                                                     |
      |                |<select>                                               |
      |                |                                                |
      |                |                                                 |
      |                |                                                  |
      |                |<tbody>                                                   |
      |                |                             
        | | | <xmp> | +----------------+--------------------------------------------------------------+ </source>

        "releaseCapture()" Syntax, Parameters and Note

        <source lang="javascript"> Note: Terminate mouse capture(set with the setCapture() method).

        Syntax:

        document.all.elementID.releaseCapture()


        </source>

      |

      | |<textarea> <tfoot> |

      | |
      <thead> | | |