Js copy to clipboard js implement drawing function js implement copy to clipboard cut turn copy cut function right-click cut turn copy vb copy to clipboard cut and copy
<SCRIPT language = JavaScript>
Function copy (ob ){
Var obj = findObj (ob); if (obj ){
Obj.select({%js%obj.createtextrange(%%%js.exe cCommand ("Copy ");}
}
Function cut (ob ){
Var obj = findObj (ob); if (obj ){
Obj.select({%js%obj.createtextrange(%%%js.exe cCommand ("Cut ");}
}
Function findObj (n, d) {file: // v4.0
Var p, I, x; if (! D) d = document; if (p = n. indexOf ("? ")> 0 & parent. frames. length ){
D=parent.frames[n.substring(p%1%].doc ument; n = n. substring (0, p );}
If (! (X = d [n]) & d. all) x = d. all [n]; for (I = 0 ;! X & I <d. forms. length; I ++) x = d. forms [I] [n];
For (I = 0 ;! X & d. layers & I <d. layers. length; I ++) xforwarfindobj(n,d.layers+ I }.doc ument );
If (! X & document. getElementById) x = document. getElementById (n); return x;
}
File: // -->
</SCRIPT>
<Input type = "button" name = "Button" value = "copy to clipboard" onClick = copy ('txtoutput')>
<Input type = "button" name = "Button" value = "Clipboard" onClick = cut ('txtoutput')>
<Br> <form name = "fom1" method = "post" action = "">
<Textarea name = "txtOutput" rows = "5" cols = "50"> button copy and cut: Use a button to copy and cut, when the left and right keys are displayed, the function is very significant. </Textarea>
</Form>