JavaScript Reference/Event Handlers Reference/onCut

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

"onCut" Example

    
<html>
<body>
<p contenteditable="true" 
   oncut="alert("The text is cut and copied to the clipboard")">
   Cut and copy this text to the clipboard by pressing Ctrl+X.
</p>
</body>
</html>



"onCut" is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |<a>                             <address>                     |
|                |<applet>                        <area>                        |
|                |<b>                             <bdo>                         |
|                |<big>                           <blockquote>                  |
|                |<body>                          <button>                      |
|                |<caption>                       <center>                      |
|                |<cite>                          <code>                        |
|                |<custom>                        <dd>                          |
|                |<dfn>                           <dir>                         |
|                |<div>                           <dl>                          |
|                |document                        <dt>                          |
|                |<em>                            <embed>                       |
|                |<fieldset>                      <font>                        |
|                |<form>                          <hn>                          |
|                |<hr>                            <i>                           |
|                |<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">           |
|                |<kbd>                           <label>                       |
|                |<legend>                        <li>                          |
|                |<listing>                       <map>                         |
|                |<marquee>                       <menu>                        |
|                |<nobr>                          <ol>                          |
|                |<p>                             <pre>                         |
|                |<rt>                            <ruby>                        |
|                |<s>                             <samp>                        |
|                |<select>                        <small>                       |
|                |<span>                          <strike>                      |
|                |<strong>                        <sub>                         |
|                |<sup>                           <table>                       |
|                |<tbody>                         <td>                          |
|                |<textarea>                      <tfoot>                       |
|                |<th>                            <thead>                       |
|                |<tr>                            <tt>                          |
|                |<u>                             <ul>                          |
|                |<var>                           <xmp>                         |
+----------------+--------------------------------------------------------------+



"onCut" Properties

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



"onCut" Syntax and Note

Note:
    
This event fires when user cuts the selection. 
To cut a selection, the selection must be editable.