[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...