[Original] php + ajax to simulate Win File Management System 7. [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 last file is [original] php + ajax to simulate Win file management system
//
This tutorial is original on this site.
Author: www.drise.cn
Email: drise@163.com
QQ: 271728967
//
The last file is the js. js file.
Var xmlhttp = false;
Function aa (obj)
{
Obj. className = 'a ';
Obj. onblur = function () {obj. className = 'BB ';}
}
Function resizepic (thispic ){
// $ ('Imgbox'). style. width = $ ('pbox'). clientWidth;
If (thispic. height> 55 | thispic. width> 55) thispic. style. zoom = 56/(thispic. height> thispic. width? Thispic. height: thispic. width );
}
Function resizeimg (thispic ){
If (thispic. height> 100 | thispic. width> 100) thispic. style. zoom = 180/(thispic. height> thispic. width? Thispic. height: thispic. width );
}
These images are scaled. However, there is a problem in fox.
Function Losefocus (obj, path) {// check the validity of the file when the file is created, and send the parameter to the rename. php file,
Var ivalue = obj. value;
If ('New folder' = ivalue |! Ivalue. match (/^ \ w {1,255} $/I )){
Alert ('Enter a valid folder name! ');
Obj. select ();
Return false;
} Else {
CreateAjax ();
Var url = "rename. php? Path = "+ encodeURI (path. replace ("/", "\/") + "& nname =" + encodeURI (obj. value) + "& action = mkdir & rd =" + Math. random ();
Senddata ('GET', url, ReturnValue, 'mkdir ');
Document. getElementById ('T1'). innerHTML = ivalue;
Window. location. reload ();
}
}
I will not write it down today, but my hands hurt. I will try again tomorrow.
Author // This tutorial by the site original, reproduced please indicate the author: www.drise.cn mailbox: drise@163.com QQ: 271728967 // The Last file is...