[Original] php + ajax to simulate Win file management system 6_php tutorial

Source: Internet
Author: User
[Original] php + ajax to simulate Win file management system 6. [Original] php + ajax to achieve the simulation of Win file management system this tutorial by the site original, reproduced please indicate the author: www.drise.cn mailbox: drise@163.comQQ: 271728967 the above php file has finished [original] php + ajax to implement a simulated Win file management system

// This tutorial is original on this site. For more information, see here.

Author: www.drise.cn

Email: drise@163.com

QQ: 271728967

//

The PHP file above is over. Next, let's talk about the document. js file. some files come from the Internet.

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 ="

  • Cutting
  • Reset
  • Paste
  • Delete
  • Rename

  • ";


    ShowMenu (obj, 0, 0 );


    Return false;


    }


    Document. onmousemove = hiddenSubMenu;


    AttachEvent ('onload', loadsubMenu); // JavaScript Document // wait for the call.

    Previous

    Author // This tutorial by the site original, reproduced please indicate to the author: www.drise.cn mailbox: drise@163.com QQ: 271728967 // above php file finished...

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.