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
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
解决方案 »
- 求助JS获得TD的值然后修改
- form的onsubmit调用aa()函数与form中的<select>的onchange调用bb()可以吗?
- 新手问题
- 为什么下面同样的定义多为数组 显示结果却完全不同????
- 如何通过一个复选框来控制其他相同名称的多个复选框的全选和反选???
- 请问:我在进入一个新的web页面时,怎么才能使光标默认指在第一个编辑框呢?
- jquery求助 ? jQuery19106593590301938974="514"
- <div> 里面有滚动条,怎样才能在页面刷新的时候记录滚动条的位置,就是让 <DIV> 里面的内容保持不变呢?
- 搞不清frames,top,parent,window,document的关系啊
- 一个列表框中有几个选项,现在我想改变某一个选项的字体颜色,请问应该怎样做?
- 滚动问题!!!!!!
- 那里有错了
document.execCommand("Paste")
能不能给点详细点的呀
document.execCommand("Copy")
document.execCommand("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);
}
明白吗?
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>
<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')>