时间:2021-05-28
functionf_frameStyleResize(targObj)
{
vartargWin=targObj.parent.document.all[targObj.name];
if(targWin!=null)
{
varHeightvalue=targObj.document.body.scrollHeight
if(Heightvalue<300){Heightvalue=300}//不小于600
targWin.style.pixelHeight=Heightvalue;
}
}
functionf_iframeResize()
{
bLoadComplete=true;
f_frameStyleResize(self);
}
varxmlHttp=false;
try{
xmlHttp=newActiveXObject("Msxml2.XMLHTTP");
}catch(e){
try{
xmlHttp=newActiveXObject("Microsoft.XMLHTTP");
}catch(e2){
xmlHttp=false;
}
}
if(!xmlHttp&&typeofXMLHttpRequest!='undefined'){
xmlHttp=newXMLHttpRequest();
}
functionshowfiles(){
varurl="showfile.asp?pid"+Math.random();
xmlHttp.open("GET",url,true);
xmlHttp.onreadystatechange=reloadX;
xmlHttp.send(null);
}
functionshowfiles2(folder){
varurl="showfile.asp?foldername="+folder+"&pid"+Math.random();
xmlHttp.open("GET",url,true);
xmlHttp.onreadystatechange=reloadX;
xmlHttp.send(null);
}
functiongoback(){
varurl="showfile.asp?go=back"+"&pid"+Math.random();
xmlHttp.open("GET",url,true);
xmlHttp.onreadystatechange=reloadX;
xmlHttp.send(null);
}
functiongonow(){
document.getElementById("filemanage_all").style.display="block";
varurl="showfile.asp?go=now"+"&pid"+Math.random();
xmlHttp.open("GET",url,true);
xmlHttp.onreadystatechange=reloadX;
xmlHttp.send(null);
}
functionreloadX(){
if(xmlHttp.readyState<4){
setmsg(' <IMGsrc=img/loading_pic.gifwidth=16height=16> 数据载入,请稍候...');
}
if(xmlHttp.readyState==4){
f_iframeResize();
varresponse=xmlHttp.responseText;
document.getElementById("myfile").innerHTML=response;
varbLoadComplete=false;
f_iframeResize();
}
}
functiondelfile()
{
if(window.confirm("你确定要删除选定文件吗?")==true)
{
varfileid="";
varobj=document.getElementsByName('myselect');
for(vari=0;i<obj.length;i++){
if(obj[i].checked)
fileid=fileid+obj[i].value+',';
}
if(fileid)
{
varurl="../delfile.asp?fid="+fileid+"&pid"+Math.random();
xmlHttp.open("GET",url,true);
xmlHttp.onreadystatechange=delfileok;
xmlHttp.send(null);
}
else
{
alert("请先选择文件!");
}
}
}
functionshare()
{
varfileid="";
varobj=document.getElementsByName('myselect');
for(vari=0;i<obj.length;i++){
if(obj[i].checked)
fileid=fileid+obj[i].value+',';
}
if(fileid)
{
varurl="../shareit.asp?action=share&myselect="+fileid+"&pid"+Math.random();
xmlHttp.open("GET",url,true);
xmlHttp.onreadystatechange=shareok;
xmlHttp.send(null);
}
else
{
alert("请先选择文件!");
}
}
functiondelfolder(fid)
{
if(window.confirm("你确定要删除选定文件夹吗?")==true)
{
varurl="../delfolder.asp?action=del&fid="+fid;
xmlHttp.open("GET",url,true);
xmlHttp.onreadystatechange=delfolderok;
xmlHttp.send(null);
}
}
functiondellink(lid)
{
if(window.confirm("你确定要删除选定网址标签吗?")==true)
{
varurl="dellink.asp?id="+lid;
xmlHttp.open("GET",url,true);
xmlHttp.onreadystatechange=dellinkok;
xmlHttp.send(null);
}
}
functionformate()
{
if(window.confirm("系统将清除您网盘内的所有数据,您确定要继续吗?")==true)
{
varurl="formate.asp?pid"+Math.random();
xmlHttp.open("GET",url,true);
xmlHttp.onreadystatechange=formateok;
xmlHttp.send(null);
}
}
functionshareok(){
if(xmlHttp.readyState==4){
gonow();
setmsg(' 文件共享成功!');
}
}
functiondelfolderok(){
if(xmlHttp.readyState==4){
gonow();
setmsg(' 选定文件夹删除成功!');
}
}
functiondelfileok(){
if(xmlHttp.readyState==4){
gonow();
setmsg(' 选定文件删除成功!');
}
}
functiondellinkok(){
if(xmlHttp.readyState==4){
gonow();
setmsg(' 选定网址标签删除成功!');
}
}
functionformateok(){
if(xmlHttp.readyState==4){
showfiles();
setmsg(' 网盘数据已经全部清空!');
}
}
functionsetmsg(message){
document.getElementById("smessage").style.display="block";
document.getElementById("messagebody").innerHTML=message;
setTimeout(function(){document.getElementById("smessage").style.display="none"},1000);
}
functioneditfolder(fid,inputname,inputvalue,share,npwd,pwd){
document.getElementById(inputvalue).innerHTML="<fontsize='2'>文件夹名:</font><inputname='"+inputname+"'type='text'size='10'value='"+inputvalue+"'class='inputbox'onMouseOver=this.style.background='#FFF1BB'onMouseOut=this.style.background=''> <inputtype='checkbox'name='everyonex'value='yes'"+share+">共享<inputtype='checkbox'name='needpasswordx'value='yes'"+npwd+">需要密码<fontsize='2'>访问密码:</font><inputtype='password'value='"+pwd+"'name='passwordinx'size='20'class='inputbox'onMouseOver=this.style.background='#FFF1BB'onMouseOut=this.style.background=''> <inputtype='button'class='mybutton'value='编辑'name='B1'onclick=editfolder2('"+escape(inputvalue)+"','"+fid+"');>";
}
functioneditfolder2(inputname,fid){
varfoldernamex=document.getElementById("temp").value
vary1x='no';
vary2x='no';
varpwdx=document.getElementById("passwordinx").value;
if(document.getElementById("everyonex").checked)
{
y1x=document.getElementById("everyonex").value;
}
if(document.getElementById("needpasswordx").checked)
{
y2x=document.getElementById("needpasswordx").value;
}
if(foldernamex!=undefined)
{
varurl="../editfolder.asp?action=editit&rename="+escape(foldernamex)+"&everyone="+y1x+"&needpassword="+y2x+"&passwordin="+pwdx+"&foldername=/"+inputname+"/&folderid="+fid+"&pid="+Math.random();
xmlHttp.open("GET",url,true);
xmlHttp.onreadystatechange=editfolderok;
xmlHttp.send(null);
}
else
{
setmsg(' 编辑文件夹取消!');
}
}
functioneditfolderok(){
if(xmlHttp.readyState==4){
gonow();
setmsg(' 编辑文件夹成功!');
}
}
functioneditfile(fileid,inputname,inputvalue,fileintro,share){
document.getElementById(fileid).innerHTML="<fontsize='2'>文件名:</font><INPUTsize=16name='filerename'class='inputbox'value='"+inputvalue+"'><fontsize='2'> 是否公享</font><inputtype='checkbox'name='fileshare'value='ture'"+share+"> <fontsize='2'>说明编辑:</font><INPUTsize=21name='fileintro'class='inputbox'value='"+fileintro+"'><inputtype='button'value='编辑'name='B5'class='mybutton'onClick=editfile2('"+fileid+"');>";
}
functioneditfile2(fileid){
varfilerename=document.getElementById("filerename").value
varfileshare='no';
varfileintro=document.getElementById("fileintro").value;
if(document.getElementById("fileshare").checked)
{
fileshare=document.getElementById("fileshare").value;
}
if(filerename!=undefined)
{
varurl="../editfile.asp?action=save&rename="+escape(filerename)+"&share="+fileshare+"&intro="+fileintro+"&id="+fileid;
xmlHttp.open("GET",url,true);
xmlHttp.onreadystatechange=editfileok;
xmlHttp.send(null);
}
}
functioneditfileok(){
if(xmlHttp.readyState==4){
gonow();
setmsg(' 编辑文件成功!');
}
}
functionCheckAll(form)
{
for(vari=0;i<form.elements.length;i++)
{
vare=form.elements[i];
e.checked=true
}
}
functionCheckOthers(form)
{
for(vari=0;i<form.elements.length;i++)
{
vare=form.elements[i];
if(e.checked==false)
{
e.checked=true;
}
else
{
e.checked=false;
}
}
}
functioncreatfolder(){
varfoldername=document.getElementById("foldername").value;
vary1='no';
vary2='no';
varpwd=document.getElementById("passwordin").value;
if(document.getElementById("everyone").checked)
{
y1=document.getElementById("everyone").value;
}
if(document.getElementById("needpassword").checked)
{
y2=document.getElementById("needpassword").value;
}
if(foldername!=undefined)
{
varurl="../createfolder.asp?action=create&foldername="+foldername+"&everyone="+y1+"&needpassword="+y2+"&passwordin="+pwd;
xmlHttp.open("GET",url,true);
xmlHttp.onreadystatechange=creatfolderok;
xmlHttp.send(null);
}
}
functioncreatfolderok(){
if(xmlHttp.readyState==4){
hidemenu();
gonow();
setmsg(' 新建文件夹成功!');
}
}
functionaddlink(){
varurlname=document.getElementById("urlname").value;
vary1='no';
varurllocation=document.getElementById("urllocation").value;
if(document.getElementById("sharethis").checked)
{
y1=document.getElementById("sharethis").value;
}
if(urlname!=undefined)
{
varurl="addlink.asp?uname="+urlname+"&share="+y1+"&uloction="+urllocation;
xmlHttp.open("GET",url,true);
xmlHttp.onreadystatechange=addlinkok;
xmlHttp.send(null);
}
}
functionaddlinkok(){
if(xmlHttp.readyState==4){
hidemenu1();
gonow();
setmsg(' 网址标签添加成功!');
}
}
functionmovefiles(){
varfileid="";
varobj=document.getElementsByName('myselect');
for(vari=0;i<obj.length;i++){
if(obj[i].checked)
fileid=fileid+obj[i].value+',';
}
if(fileid)
{
varfoldername=document.getElementById("folder").value;
varurl="../moveitok.asp?action=createbyurl&folder="+foldername+"&my_select="+fileid;
xmlHttp.open("GET",url,true);
xmlHttp.onreadystatechange=movefilesok;
xmlHttp.send(null);
}
else
{
alert(" 请先选择文件!");
}
}
functionmovefilesok(){
if(xmlHttp.readyState==4){
hidemenu();
gonow();
setmsg(' 文件移动成功!');
}
}
varshowl=true;
functionshowmenu2(){
document.getElementById("Movefiles").style.display="block";
document.getElementById('Movefiles').style.height=20;
}
functionshowmenu1(){
document.getElementById("CreateFolder").style.display="block";
document.getElementById('CreateFolder').style.height=20;
}
functionshowmenu4(){
document.getElementById("addlink").style.display="block";
document.getElementById('addlink').style.height=20;
}
functionshowmenu3(){
if(showl!=false)
{
document.getElementById('showloctionx').innerHTML="<imgborder='0'src='img/showup.gif'width='16'height='16'>";
document.getElementById("mylocation").style.display="block";
document.getElementById('mylocation').style.height=20;
showl=false
}
else
{
document.getElementById('showloctionx').innerHTML="<imgborder='0'src='img/show.gif'width='16'height='16'>";
document.getElementById("mylocation").style.display="none";
showl=true;
}
}
functionhidemenu(){
document.getElementById("Movefiles").style.display="none";
document.getElementById("CreateFolder").style.display="none";
}
functionhidemenu1(){
document.getElementById("addlink").style.display="none";
}
functionsetorderby(){
varorderby=document.getElementById("orderby").value;
varurl="setorderby.asp?setby="+orderby+"&pid="+Math.random();
xmlHttp.open("GET",url,true);
xmlHttp.onreadystatechange=setorderbyok;
xmlHttp.send(null);
}
functionsetorderbyok(){
if(xmlHttp.readyState==4){
gonow();
setmsg(' 文件排序设置成功!');
}
}
functioneditlink(linkid,urlname,urlloction,share){
document.getElementById(linkid).innerHTML="<fontsize='2'>标签名:</font><INPUTsize=13name='editlinkname'class='inputbox'value='"+urlname+"'><fontsize='2'> 是否公享</font><inputtype='checkbox'name='editlinkshare'value='yes'"+share+"> <fontsize='2'>网址编辑:</font><INPUTsize=25name='editlinkloaction'class='inputbox'value='"+urlloction+"'><inputtype='button'value='编辑'name='B5'class='mybutton'onClick=editlink2('"+escape(linkid)+"');>";
}
functioneditlink2(linkidx){
varurlname=document.getElementById("editlinkname").value;
varlinkshare='no';
varurlloction=document.getElementById("editlinkloaction").value;
if(document.getElementById("editlinkshare").checked)
{
linkshare=document.getElementById("editlinkshare").value;
}
if(urlname!=undefined)
{
varurl="editlink.asp?uname="+urlname+"&share="+linkshare+"&uloction="+urlloction+"&id="+linkidx+"&pid="+Math.random();
xmlHttp.open("GET",url,true);
xmlHttp.onreadystatechange=editlinkok;
xmlHttp.send(null);
}
}
functioneditlinkok(){
if(xmlHttp.readyState==4){
gonow();
setmsg(' 编辑网址标签成功!');
}
}
functionhighlightme(o){
o.parentNode.parentNode.style.backgroundColor=(o.checked)?"#FFEBD7":""
}
声明:本页内容来源网络,仅供用户参考;我单位不保证亦不表示资料全面及准确无误,也不保证亦不表示这些资料为最新信息,如因任何原因,本网内容或者用户因倚赖本网内容造成任何损失或损害,我单位将不会负任何法律责任。如涉及版权问题,请提交至online#300.cn邮箱联系删除。
微信小程序如何引用其他js文件1.我们先建立一个common.js文件,在common.js编写我们的程序,functionmyfunc(){console.l
网页底部版权找到js/common.js删除以下js代码即可复制代码代码如下:onload=function(){varlink_arr=document.ge
Vs2008环境,上图为先Common.js复制代码代码如下:varCommon={Trim:function(str){returnstr.replace(/
将下面代码保存为Common.js类库功能:1.Trim(str)--去除字符串两边的空格2.XMLEncode(str)--对字符串进行XML编码3.Show
一.首先在common.js里封装一个函数,在需要调用jsSDK的页面引用此方法即可实现微信的信息配置functionsignatureJSSDK(){varu