Home > Backend Development > PHP Tutorial > [Original] PHP+ajax implements simulated Win file management system 6_PHP tutorial

[Original] PHP+ajax implements simulated Win file management system 6_PHP tutorial

WBOY
Release: 2016-07-13 11:00:04
Original
999 people have browsed it

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

//本教程由本站原创,转载请注明来处

作者:www.drise.cn

邮箱:drise@163.com

QQ:271728967

//

上面php文件讲完了,下面来讲一下,document.js文件.些文件来自互联网.

var subMenuSrcObj=null;
function ShowMenu(obj,x,y){


 try{

  subMenuSrcObj=obj;


  document.getElementById("subMenu").style.top=(ie_y(obj)+obj.offsetHeight+y)+"px";


  document.getElementById("subMenu").style.left=(ie_x(obj)+x)+"px";


 }catch(e)
 {  ;
 }


}


function loadsubMenu()


{


 document.body.insertAdjacentHTML("afterBegin","

s
");


}


function hiddenSubMenu1()


{


 document.getElementById("subMenu").style.left="-9000px";


}


function hiddenSubMenu()


{


 try


 {


 


 


 obj=document.getElementById("subMenu");


 temp=false;


 e=event.srcElement;


 if(e==obj)


 {


  temp=false;


 }else


 {


  temp=true;


  while(e=e.offsetParent)


  {


   if(e==obj||e==subMenuSrcObj)


   {


    temp=false;


   }


  }


 }


 if(event.srcElement==subMenuSrcObj)


 {


  temp=false;


 }


 if(temp&&parseInt(obj.style.left)>0)


 {


  hiddenSubMenu1();


 }


 }


 catch (e)


 {


 }


}


function ie_y(e){ 


 var t=e.offsetTop; 


 while(e=e.offsetParent){ 


  t+=e.offsetTop; 


 } 


 return t; 



function ie_x(e){ 


 var l=e.offsetLeft; 


 while(e=e.offsetParent){ 


  l+=e.offsetLeft; 


 } 


 return l; 


}


function del(){


  


  


}

 

 

    function myMenuShow(obj,btn)


    {


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

  • 剪  切
  • 复  制
  • 粘  贴

  • 删 除

  • 重命名

  • ";


                    ShowMenu(obj,0,0);


                    return false;


        }


    document.onmousemove=hiddenSubMenu;


    attachEvent('onload', loadsubMenu);// JavaScript Document//等一下只要这样调用就行了.

    上一篇

     

    www.bkjia.comtruehttp://www.bkjia.com/PHPjc/631851.htmlTechArticle[原创]php+ajax实现模拟Win文件管理系统 //本教程由本站原创,转载请注明来处 作者:www.drise.cn 邮箱:drise@163.com QQ:271728967 // 上面php文件讲完了...
    source:php.cn
    Statement of this Website
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
    Popular Tutorials
    More>
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template