JavaScript Reference/Event Handlers Reference/onCopy

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

"onCopy" Example

    
<html>
<body>
<p oncopy="alert("The text is copied to the clipboard")">
Copy this text to the system clipboard.
</p>
</body>
</html>



"onCopy" is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |<a>                             <address>                     |
|                |<area>                          <b>                           |
|                |<bdo>                           <big>                         |
|                |<blockquote>                    <caption>                     |
|                |<center>                        <cite>                        |
|                |<code>                          <custom>                      |
|                |<dd>                            <dfn>                         |
|                |<dir>                           <div>                         |
|                |<dl>                            <dt>                          |
|                |<em>                            <fieldset>                    |
|                |<form>                          <hn>                          |
|                |<hr>                            <i>                           |
|                |<img>                           <legend>                      |
|                |<li>                            <listing>                     |
|                |<menu>                          <nobr>                        |
|                |<ol>                            <p>                           |
|                |<pre>                           <s>                           |
|                |<samp>                          <small>                       |
|                |<span>                          <strike>                      |
|                |<strong>                        <sub>                         |
|                |<sup>                           <td>                          |
|                |<th>                            <tr>                          |
|                |<tt>                            <u>                           |
|                |<ul>                                                          |
+----------------+--------------------------------------------------------------+



"onCopy" Properties

+----------------+--------------------------------------------------------------+
| Properties     |altKey                          altLeft                       |
|                |cancelBubble                    clientX                       |
|                |clientY                         ctrlKey                       |
|                |ctrlLeft                        dataFld                       |
|                |dataTransfer                    offsetX                       |
|                |offsetY                         returnValue                   |
|                |screenX                         screenY                       |
|                |shiftKey                        shiftLeft                     |
|                |srcElement                      type                          |
|                |x                               y                             |
+----------------+--------------------------------------------------------------+



"onCopy" Syntax and Note

Note:
    
This event fires when the user copies the selection to the clipboard.