Sets or retrieves the x-coordinate of the mouse pointer's position relative to the client area of the window, excluding window decorations and scroll bars.
Sets or retrieves the y-coordinate of the mouse pointer's position relative to the client area of the window, excluding window decorations and scroll bars.
Sets or retrieves the y-coordinate, in pixels, of the mouse pointer's position relative to a relatively positioned parent element.
Remarks
The onbeforecopy event fires on the source element. Use the setData method to specify a data format for the selection.
Example
This example uses the onbeforecopy event to customize copy behavior.
<HEAD>
<SCRIPT>
var sNewValue = "copy event fired";
var bFired = false;
var sSave = "";
function Source_Beforecopy()
{
sSave = oSource.innerText;
bFired = true;
event.returnValue = false;
}
function Source_Copy()
{
window.clipboardData.setData("Text", sNewValue);
}
function Target_BeforePaste()
{
event.returnValue = false;
}
function Target_Paste()
{
event.returnValue = false;
oTarget.value = window.clipboardData.getData("Text");
}
</SCRIPT>
</HEAD>
<BODY>
<SPAN ID=oSource onbeforecopy="Source_Beforecopy()"
oncopy="Source_Copy()">copy this text</SPAN>
<INPUT ID=oTarget onbeforepaste="Target_BeforePaste()"
onpaste="Target_Paste()">
</BODY>
This feature requires Microsoft® Internet Explorer 5 or later. Click the following icon to install the latest version. Then reload this page to view the sample.
Standards Information
There is no public standard that applies to this event.