JavaScript Reference/Event Handlers Reference/onPaste

Материал из Web эксперт
Версия от 11:22, 26 мая 2010; Admin (обсуждение | вклад) (1 версия)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

"onPaste" Example

   <source lang="javascript">
   

<html> <body>

Copy and paste this text into the textarea element.

<textarea cols=60 onpaste="alert("The text is being pasted")"> </textarea> </body> </html>


     </source>
   
  


"onPaste" 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"> | | |<inputtype="image"> <input type="password"> | | |<input type="radio"> <input type="reset"> | | |<input type="submit"> <input type="text"> | | | <label> |

| |<legend>
  • | | |<listing> <map> | | |<marquee> <menu> | | |<nobr>
      | | |

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

        "onPaste" Properties

        <source lang="javascript"> +----------------+--------------------------------------------------------------+ | Properties |altKey altLeft | | |cancelBubble clientX | | |clientY ctrlKey | | |ctrlLeft dataTransfer | | |offsetX offsetY | | |returnValue screenX | | |screenY shiftKey | | |shiftLeft srcElement | | |type x | | |y | +----------------+--------------------------------------------------------------+

        </source>



        "onPaste" Syntax and Note

        <source lang="javascript"> Note:

        This event fires when the user pastes data from the clipboard to the document.

        </source>

      |

      | |<textarea> <tfoot> |

      | |
      <thead> | | |