复制粘贴的js

<title></title>
    <script language=Jscript>
    function Exec(obj,cmd){
    obj.select();document.execCommand(cmd)}
    function Paste(obj){
    obj.focus();document.execCommand('paste')}
    function Exe(cmd){
    document.execCommand(cmd)}
    </script>
    <form name=f1>
    <input type=button value='拷贝' onclick=Exec(code,'Copy')>
    <input type=button value='剪切' onclick=Exec(code,'Cut')>
    <input type=button value='清空' onclick=Exec(code,'Delete')>
    <textarea name=code rows="20">Input Code ...</textarea></form>

你可能感兴趣的:(html)