ASP:function procpaste()
  dim sStr,sStr1,i,ret,sArr
  if Session("bufferdir")="" and Session("bufferfile")="" then exit function
  sArr=split(Session("bufferdir"),"|")
  if sArr(1)=gPath then  htmend "不能自己覆盖自己!",1,""
  for i=2 to ubound(sArr)
     sStr=sArr(1)&sArr(i)
     sStr1=gPath&sArr(i)
     if fo.FolderExists(Server.MapPath(sStr1)) then htmEnd "目录:"&sStr1&" 已经存在!",1,""
     if procCheckDir(sStr,1)="ok" then
       if sArr(0)="cut" then
        fo.MoveFolder Server.MapPath(sStr),Server.MapPath(sStr1)
       else
        fo.CopyFolder Server.MapPath(sStr),Server.MapPath(sStr1)
       end if
     end if
   next
   
  sArr=split(Session("bufferfile"),"|")
  for i=2 to ubound(sArr)
     sStr=sArr(1)&sArr(i)
     sStr1=gPath&sArr(i)
     if procCheckFile(sStr,1)="ok" then
       if sArr(0)="cut" then
        if fo.FileExists(Server.MapPath(sStr1)) then htmEnd "文件 "&sStr1&" 已经存在!",1,""
        fo.MoveFile Server.MapPath(sStr),Server.MapPath(sStr1)
       else
        fo.CopyFile Server.MapPath(sStr),Server.MapPath(sStr1),true
       end if
     end if
   next
  Session("bufferdir")=""
  Session("bufferfile")=""
end Function

解决方案 »

  1.   

    document.execCommand("Copy")
    document.execCommand("Paste")
      

  2.   

    楼上的人说的是什么意思呀
    能不能给点详细点的呀
    document.execCommand("Copy")
    document.execCommand("Paste");
    这是什么意思呀,怎么用呢?
    举个例子,好吗?
      

  3.   

    <div class="Btn" TITLE="粘贴" LANGUAGE="javascript" onclick="format1('paste');">
        <img class="Ico" src="images\paste.gif" WIDTH="16" HEIGHT="16">
      </div>function format1(what,opt)
    {
      if (opt=="removeFormat")
      {
        what=opt;
        opt=null;
      }  if (opt==null) Composition.document.execCommand(what);
      else Composition.document.execCommand(what,"",opt);  pureText = false;
      Composition.focus();
    }function format(what,opt)
    {
      if (!validateMode()) return;  format1(what,opt);
    }
    明白吗?
      

  4.   

    document.execCommand("Copy")相当于拷贝
    document.execCommand("Paste")相当于粘贴<input id=a1 value=123><br>
    <input type=button value=拷贝 onclick='a1.focus();a1.select();document.execCommand("Copy")'>
    <input type=button value=粘贴 onclick='a2.focus();document.execCommand("Paste")'><br>
    <input id=a2>
      

  5.   

    <input type=button value=剪切     onclick=document.execCommand('Cut')>
    <input type=button value=拷贝     onclick=document.execCommand('Copy')>
    <input type=button value=粘贴     onclick=document.execCommand('Paste')>
    <input type=button value=撤消     onclick=document.execCommand('Undo')>
    <input type=button value=删除     onclick=document.execCommand('Delete')>