例子
<input onclick="document.execCommand('Copy')" type=button value=选中拷贝>
sdfsdfsdfsdfdsexecCommanddfsdfsdfsdfds
Copy Command--------------------------------------------------------------------------------Copies the current selection to the clipboard.Scripting InformationCommand Copy  
User interface None. Set bUserInterface to false or omit.  
execCommand vValue Optional. Set to null or omit. 
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported, queryCommandValue.  Paste Command--------------------------------------------------------------------------------Overwrites the contents of the clipboard on the current selection.Scripting InformationCommand Paste  
User interface None. Set bUserInterface to false or omit.  
execCommand vValue Optional. Set to null or omit. 
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported, queryCommandValue.  
pasteHTML Method--------------------------------------------------------------------------------Pastes HTML text into the given text range, replacing any previous text and HTML elements in the range.SyntaxTextRange.pasteHTML(sHTMLText)
ParameterssHTMLText Required. String that specifies the HTML text to paste. The string can contain text and any combination of the HTML tags described in HTML Elements. Return ValueNo return value.ResAlthough this method never fails, it might alter the HTML text to make it fit the given text range. For example, pasting a table cell into a text range that does not contain a table might cause the method to insert a table element. For predictable results, paste only well-formed HTML text that fits within the given text range.This method is accessible at run time. If elements are removed at run time, before the closing tag is parsed, areas of the document might not render.This feature might not be available on non-Microsoft? Win32? platforms. For the latest information about Microsoft? Internet Explorer cross-platform compatibility, see article Q172976  in the Microsoft Knowledge Base.ExampleThis example uses the pasteHTML method to replace the current selection with a new paragraph.<SCRIPT LANGUAGE="JScript">
var sel = document.selection;
if (sel!=null) {
    var rng = sel.createRange();
    if (rng!=null)
        rng.pasteHTML("<P><B>Selection has been replaced.</B></P>");
}
</SCRIPT>