搜索
首页php教程php手册[原创]php+ajax实现模拟Win文件管理系统九

[原创]php+ajax实现模拟Win文件管理系统九

Jun 13, 2016 am 09:58 AM
php+ajaxwin作者原创实现文件模拟管理系统

//

本站原创:www.drise.cn

作者:drise1

QQ:271728967

//

接上面的.
 function Senddata(method,url,ReturnValue,Action){  //保存数据

   xmlhttp.open(method,url,true); 

   xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
  
   xmlhttp.setRequestHeader("Cache-Control","no-cache"); //不缓存

   if(ReturnValue !=null){

   xmlhttp.onreadystatechange=ReturnValue;

   }   

   xmlhttp.send(null);
   if(Action == 'mkdir')  //如果是创建文件夹就刷新窗口
   {
    window.location.reload();


   } 

 }


 function ReturnValue(){//返回值

  if(xmlhttp.readystate != 4 || xmlhttp.status != 200){
   document.getElementById("t0").innerHTML="

正在发送...
";
 }

  if( xmlhttp.readystate == 4 || xmlhttp.status == 200 ){

   document.getElementById("t0").innerHTML="

"+xmlhttp.responseText+"
";
 } 

 setInterval("func()",3000);//设置3000秒延迟
 }

 function func(){
  ob=document.getElementById('info');

    ob.style.display = 'none';

 }

下面为删除

 function del(obj){  


  if(confirm("确实要删除\""+obj+"\"吗?","","")){   


   CreateAjax();   


   var Delurl="rename.php?path="+encodeURI(obj.replace("/","\/"))+"&action=del&rd="+Math.random();


    xmlhttp.open("GET",Delurl,true);   


    xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");   


    xmlhttp.setRequestHeader("Cache-Control","no-cache");


    xmlhttp.onreadystatechange=function(){


     if (xmlhttp.readystate == 4 || xmlhttp.status == 200){ 


      var value=xmlhttp.responseText;


     if( value =='t' ){


      document.getElementById(obj).style.display="none";


     }else if( value =='fo'){


      alert("操作失败,请查看权限或文件夹不为空!foss!");


     }else if( value =="ff"){


      alert("操作失败,请查看权限!");


     }else{


      alert("操作失败,请查看权限或文件夹不为空!!");


     } 


     


    }


    }


    xmlhttp.send(null);


   }


 } 


  

声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn

热AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover

AI Clothes Remover

用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool

Undress AI Tool

免费脱衣服图片

Clothoff.io

Clothoff.io

AI脱衣机

Video Face Swap

Video Face Swap

使用我们完全免费的人工智能换脸工具轻松在任何视频中换脸!

热工具

螳螂BT

螳螂BT

Mantis是一个易于部署的基于Web的缺陷跟踪工具,用于帮助产品缺陷跟踪。它需要PHP、MySQL和一个Web服务器。请查看我们的演示和托管服务。

Dreamweaver Mac版

Dreamweaver Mac版

视觉化网页开发工具

SublimeText3 Mac版

SublimeText3 Mac版

神级代码编辑软件(SublimeText3)

PhpStorm Mac 版本

PhpStorm Mac 版本

最新(2018.2.1 )专业的PHP集成开发工具

WebStorm Mac版

WebStorm Mac版

好用的JavaScript开发工具