[
会员中心
] [
发布文章
][
发布软件
] [
中文繁體
]
文章
·
资料
电脑软件
手机软件
网站源码
电脑·手机·网络
学习
话题
娱乐
故事
文化·历史
国学典籍
法律法规
操作系统
网络
办公·文件
音频视频
图形图像
硬件·驱动程序
行业
教学学习
编程
游戏
安卓
苹果
鸿蒙
其他
ASP
ASP.NET
JSP
PHP
HTML
·
CSS
·
JavaScript
本 站 搜 索
文章
软件
[选项]
文章类别:
[全部]
电脑·手机·网络
话题
故事
文化·历史
娱乐
学习
法律·法规
国学典籍
搜索选项:
文章编号
文章标题
文章作者
文章来源
相关链接
关键字词
文章标签
文章内容
软件类别:
[全部]
操作系统
网络
办公·文件
音频视频
图形图像
行业
编程
教学学习
游戏
硬件·驱动程序
安卓系统
苹果系统
鸿蒙系统
其他系统
HTML·CSS·JavaScript
ASP
JSP
PHP
ASP.NET
搜索选项:
软件编号
软件名称
软件作者
软件来源
相关链接
关键字词
软件标签
软件简介
发 送 文 章
无组件多个文件上传客户端
〖
评论()
〗〖
留言
〗〖
收藏
〗
收信地址
填写收信人的电子邮箱
邮件主题
填写邮件主题
邮件内容
现在功能放在一个htm网页中,先选择条件,再在要上传的文件夹中选择一个文件,然后程序会列出所有符合条件的文件.使用之前,就改进form的action. html head metahttp-equiv=Content-Typecontent=text/html;charset=gb2312 metaname=Keywordscontent=haokucn.com metaname=Authorcontent=haiwa titleUploadmanyfile-haokucn.com/title style *{font:menu} input{font-size:12px;} .checkbox{} .showdiv{padding-left:40px;} /style /head body 请选择要上传的条件的过滤条件:br inputonclick=document.all.strdiv.style.display=(this.checked?’’:’none’)type=checkboxclass=checkboxname=checkstrid=checkstrvalue=1labelfor=checkstr文件名/labelbr divclass=showdivid=strdivstyle=display:none;selectname=filestrconditionsxonchange=alert(this.options[this.selectedIndex].value) optionvalue=1包含/option optionvalue=0不包含/option /select inputtype=textsize=8name=filestrstrvalue=inputtype=checkboxclass=checkboxname=checkstrinstartid=checkstrinstartvalue=1labelfor=checkstrinstart文件名开头/label brinputtype=checkboxclass=checkboxname=checkstrcaseid=checkstrcasevalue=1labelfor=checkstrcase区分大小写/label !--brinputtype=checkboxclass=checkboxname=checkregid=checkregvalue=1labelfor=checkreg使用正则表达式/label --/div divinputonclick=document.all.sizediv.style.display=(this.checked?’’:’none’)type=checkboxclass=checkboxname=checksizeid=checksizevalue=1labelfor=checksize大小/label/div divclass=showdivid=sizedivstyle=display:none;selectname=filesizeconditionsxonchange=alert(this.options[this.selectedIndex].value) optionvalue=1至多/option optionvalue=0至少/option /select inputtype=textsize=8id=filesizelimitvalue=100style=text-align:rightK /div divinputonclick=document.all.typediv.style.display=(this.checked?’’:’none’)type=checkboxclass=checkboxname=checktypeid=checktypevalue=1labelfor=checktype类型/label/div divclass=showdivid=typedivstyle=display:none;selectname=fileextconditionsxonchange=alert(this.options[this.selectedIndex].value) optionvalue=1选择所选类型/option optionvalue=0排除所选类型/option /selectbr SCRIPTLANGUAGE=JavaScript !-- allextstr=gif,bmp,jpg,pngbr,js,css,html,htm,asp,aspx,javabr,mp3,avi,rm,ram,mid,wmvbr,doc,xls,ppt,eml,txt,pdf,chmbr,rar,zip,exe,reg extarr=allextstr.split(,) for(varl=0;lextarr.length;l++) { document.write(’labelfor=ft’+l+’inputonclick=selectfiletype()type=checkboxclass=checkboxname=ftid=ft’+l+’value=’+extarr[l]+’.’+extarr[l]+’/label’) } //-- /SCRIPT inputtype=hiddenname=allselectfileeext /div divinputonclick=document.all.datediv.style.display=(this.checked?’’:’none’)type=checkboxclass=checkboxname=checkdateid=checkdatevalue=1labelfor=checkdate日期/label/div divclass=showdivid=datedivstyle=display:none; inputcheckedonclick=document.all.filedate.disabled=!this.checkedtype=radioclass=checkboxname=sdateid=sdate0value=0labelfor=sdate0前/labelinputtype=textsize=8name=filedatevalue=1style=text-align:right小时(可以使用1*24)br spanstyle=width:60px;inputonclick=document.all.filedate.disabled=this.checkedtype=radioclass=checkboxname=sdateid=sdate1value=1labelfor=sdate1介于/label/spanobjectdisabledid=startdateheight=22width=100classid=clsid:20DD1B9E-87C4-11D1-8BE3-0000F8754DA1name=date1 paramname=CurrentDatevalue=Date(now()) /objectbr spanstyle=width:60px; 和/spanobjectdisabledid=enddateheight=22width=100classid=clsid:20DD1B9E-87C4-11D1-8BE3-0000F8754DA1name=date2 paramname=CurrentDatevalue=Date(now()) /object /div 在要上传的文件夹中选择一个文件:inputtype=filename=spathsize=1onchange=filelist(),然后在弹出的安全提示对话框中选择B是/Bbr inputtype=hiddenname=pathstr inputtype=hiddenname=fileliststr formname=form1method=postaction=upfiles.asp?up=1enctype=multipart/form-data inputtype=hiddenname=actvalue=upload divid=MyZone/div SCRIPTLANGUAGE=VBScript !-- ’http://www.51windows.Net ’海娃@2004-11-5 functioncheckfilename(fname1) fname=fname1 check=true searchstr=document.all.filestrstr.value if(document.all.checkstr.checked)andlen(searchstr)0then if(document.all.checkstrcase.checked=false)then fname=lcase(fname) searchstr=lcase(searchstr) endif if(document.all.checkstrinstart.checked)and(len(fname)=len(searchstr))then fname=left(fname,len(searchstr)) endif if(document.all.filestrconditions.value=1)then ifinstr(fname,searchstr)0then check=true else check=false endif else ifinstr(fname,searchstr)0then check=false else check=true endif endif endif ifHasCnStr(fname1)then check=false endif checkfilename=check endfunction functioncheckextname(fname1) fname=fname1 check=true if(document.all.checktype.checked)then fnameext=lcase(fname) whileinstr(fnameext,.)0 fnameext=right(fnameext,len(fnameext)-1) wend if(document.all.fileextconditions.value=1)then ifinstr(document.all.allselectfileeext.value,,fnameext,)0then check1=true else check=false endif else ifinstr(document.all.allselectfileeext.value,,fnameext,)0then check=false else check=true endif endif endif checkextname=check endfunction functionchecksize(fsize1) nfilesizelimit=document.all.filesizelimit.value ifisnumeric(nfilesizelimit)=falsethen checksize=true exitfunction endif fsize=fsize1 nfilesizelimit=nfilesizelimit*1024 check=true if(document.all.checksize.checked)then if(document.all.filesizeconditions.value=1)then iffsizenfilesizelimitthen check=false else check=true endif else iffsizenfilesizelimitthen check=false else check=true endif endif endif checksize=check endfunction functioncheckdate(fdate1) fdate=fdate1 check=true if(document.all.checkdate.checked)then if(document.all.sdate0.checked)then nfiledate=eval(document.all.filedate.value) ifisnumeric(nfiledate)=falsethen checkdate=true exitfunction endif iffdatedateadd(h,-nfiledate,now)then check=true else check=false endif else if(fdatestartdate.valueandfdateenddate.value)or(fdatestartdate.valueandfdateenddate.value)then check=true else check=false endif endif endif checkdate=check endfunction FunctionHasCnStr(str) SetregEx=NewRegExp regEx.Pattern=[\u4E00-\u9FA5] regEx.IgnoreCase=true regEx.Global=True HasCnStr=regEx.test(str) EndFunction functionformatsendkey(str) str1=str str1=replace(str1,%,{%}) str1=replace(str1,~,{~}) str1=replace(str1,^,{^}) str1=replace(str1,+,{+}) formatsendkey=str1 endfunction functionfilelist() SetfsoBrowse=CreateObject(Scripting.FileSystemObject) cpath=document.all.spath.value ifinstr(cpath,:)0then ifHasCnStr(cpath)then msgbox对不起,暂时不支持中文路径,请把要上传的文件移动或复制到一个非中文路径下的文件夹中。 exitfunction endif whileright(cpath,1)\ cpath=left(cpath,len(cpath)-1) wend dimallfilename,filesize,filenum allfilename= filesize=0 filenum=0 iffsoBrowse.FolderExists(cpath)then SettheFolder=fsoBrowse.GetFolder(cpath) SettheFiles=theFolder.Files ForEachxIntheFiles ifcheckfilename(x.name)andcheckextname(x.name)andchecksize(x.Size)andcheckdate(x.DateLastModified)then filesize=filesize+x.Size filenum=filenum+1 ’msgboxcheckextname(x.name) ’msgbox(x.DateLastModified)’DateCreated allfilename=allfilenameformatsendkey(x.name)*formatnumber(x.Size/1024,2)| endif next endif setfsoBrowse=nothing iflen(allfilename)0thenallfilename=left(allfilename,len(allfilename)-1) document.all.pathstr.value=cpath document.all.fileliststr.value=allfilename iflen(allfilename)0then Bstart=msgbox(共filenum个文件,formatnumber(filesize/1024/1024,3)Mvbnewlinevbnewline开始列出文件吗?,vbYesNo) ifBstart=6then creatinput() endif else msgbox没有查找到适合的文件 endif else msgbox路径错误 endif endfunction //-- /SCRIPT scriptlanguage=JavaScript //http://www.51windows.Net //海娃@2004-11-5 varallfilefolder varallfilename varfilearr varstart=1 varend vars; functionselectfiletype() { varsHTML=’,’; varoListft=document.all.ft; for(vari=0;ioListft.length;i++) { varsValue=oListft[i].value.replace(br,); if(oListft[i].checked) { sHTML+=sValue+,; } } document.all.allselectfileeext.value=sHTML; } functioncreatinput() { varallfilefolder=document.all.pathstr.value varallfilename=document.all.fileliststr.value varfilearr=allfilename.split(|) end=filearr.length+1 formhtml= for(i=start;iend;i++) { k=00000+i; k=k.substr(k.length-4,4) formhtml+=(+k+).inputtype=’file’style=’ime-mode:disabled;’size=’80’name=’file+i+’spanstyle=’width:60px;text-align:right;’+filearr[i-1].split(*)[1]+k/spanbr } document.all.MyZone.innerHTML=formhtml; s=setInterval(setfile(start),50); } functionsetfile(j) { varallfilefolder=document.all.pathstr.value varallfilename=document.all.fileliststr.value varfilearr=allfilename.split(|) eval(document.all.file+j).focus(); varWshShell=newActiveXObject(WScript.Shell) WshShell.sendKeys(allfilefolder+filearr[j-1].split(*)[0]) start++ if(start==end){clearInterval(s);start=1;} } /script 上传到:inputname=filepathtype=textvalue=/xxx/size=40 inputtype=submitname=Submitvalue=上传文件/form /body /html
文章网址:
https://dangbai.cn/Article.asp?ID=10000963
填写邮件内容
发信地址
填写发信人的电子邮箱
邮件签名
填写邮件签名
验证码
填写验证码,单击刷新验证码
程序执行中,请稍候...
发送协议
·欢迎使用本站在线文章发送系统。
·不得使用本站在线发送邮件系统发送垃圾邮件、广告邮件。
·如果收信人地址或其服务器出现错误,可能无法成功发送。
·如果有什么问题,或者意见建议,请联系[
网站管理员
]。
当百网
本站使用【啊估文章软件站】网站系统
〖
网站管理员留言簿
〗