|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
当然了,现在国内CRM厂商的产品与其说是CRM,但从至少从我的角度分析上来看,充其量只是一个大型的进销存而已了,了解尚浅,不够胆详评,这里只提技术问题以下是HTML网页殊效代码,点击运转按钮可检察效果:
以下是程序代码<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><head><metahttp-equiv="Content-Type"content="text/html;charset=gb2312"/><title>仿163网盘无革新文件上传体系</title></head><body><style>.fu_list{width:600px;background:#ebebeb;font-size:12px;}.fu_listtd{padding:5px;line-height:20px;background-color:#fff;}.fu_listtable{width:100%;border:1pxsolid#ebebeb;}.fu_listtheadtd{background-color:#f4f4f4;}.fu_listb{font-size:14px;}/*file容器款式*/a.files{width:90px;height:30px;overflow:hidden;display:block;border:1pxsolid#BEBEBE;background:url(http://images.cnblogs.com/cnblogs_com/cloudgamer/fu_btn.gif)lefttopno-repeat;text-decoration:none;}a.files:hover{background-color:#FFFFEE;background-position:0-30px;}/*file设为通明,并掩盖全部触发面*/a.filesinput{margin-left:-350px;font-size:30px;cursor:pointer;filter:alpha(opacity=0);opacity:0;}/*作废点击时的虚线框*/a.files,a.filesinput{outline:none;/*ff*/hide-focus:expression(this.hideFocus=true);/*ie*/}</style><formid="uploadForm"action="File.ashx"><tableborder="0"cellspacing="1"class="fu_list"><thead><tr><tdcolspan="2"><b>上传文件</b></td></tr></thead><tbody><tr><tdalign="right"width="15%"style="line-height:35px;">增加文件:</td><td><ahref="javascript:void(0);"class="files"id="idFile"></a><tableborder="0"cellspacing="0"><thead><tr><td>文件路径</td><tdwidth="100"></td></tr></thead><tbodyid="idFileList"></tbody></table></td></tr><tr><tdcolspan="2"style="color:gray">温馨提醒:最多可同时上传<bid="idLimit"></b>个文件,只同意上传<bid="idExt"></b>文件。</td></tr><tr><tdcolspan="2"align="center"id="idMsg"><inputtype="button"value="入手下手上传"id="idBtnupload"disabled="disabled"/><inputtype="button"value="全体作废"id="idBtndel"disabled="disabled"/></td></tr></tbody></table></form><scripttype="text/javascript">varisIE=(document.all)?true:false;var$=function(id){return"string"==typeofid?document.getElementById(id):id;};varClass={create:function(){returnfunction(){this.initialize.apply(this,arguments);}}}varExtend=function(destination,source){for(varpropertyinsource){destination[property]=source[property];}}varBind=function(object,fun){returnfunction(){returnfun.apply(object,arguments);}}varEach=function(list,fun){for(vari=0,len=list.length;i<len;i++){fun(list,i);}};//文件上传类varFileUpload=Class.create();FileUpload.prototype={//表单工具,文件控件寄存空间initialize:function(form,folder,options){this.Form=$(form);//表单this.Folder=$(folder);//文件控件寄存空间this.Files=[];//文件汇合this.SetOptions(options);this.FileName=this.options.FileName;this._FrameName=this.options.FrameName;this.Limit=this.options.Limit;this.Distinct=!!this.options.Distinct;this.ExtIn=this.options.ExtIn;this.ExtOut=this.options.ExtOut;this.onIniFile=this.options.onIniFile;this.onEmpty=this.options.onEmpty;this.onNotExtIn=this.options.onNotExtIn;this.onExtOut=this.options.onExtOut;this.onLimite=this.options.onLimite;this.onSame=this.options.onSame;this.onFail=this.options.onFail;this.onIni=this.options.onIni;if(!this._FrameName){//为每一个实例创立分歧的iframethis._FrameName="uploadFrame_"+Math.floor(Math.random()*1000);//ie不克不及修正iframe的namevaroFrame=isIE?document.createElement("<iframename=""+this._FrameName+"">"):document.createElement("iframe");//为ff设置nameoFrame.name=this._FrameName;oFrame.style.display="none";//在ie文档未加载完用appendChild会报错document.body.insertBefore(oFrame,document.body.childNodes[0]);}//设置form属性,关头是target要指向iframethis.Form.target=this._FrameName;this.Form.method="post";//注重ie的form没有enctype属性,要用encodingthis.Form.encoding="multipart/form-data";//收拾一次this.Ini();},//设置默许属性SetOptions:function(options){this.options={//默许值FileName:"",//文件上传控件的name,共同背景利用FrameName:"",//iframe的name,要自界说iframe的话这里设置nameonIniFile:function(){},//收拾文件时实行(个中参数是file工具)onEmpty:function(){},//文件空值时实行Limit:0,//文件数限定,0为不限定onLimite:function(){},//凌驾文件数限定时实行Distinct:true,//是不是不同意不异文件onSame:function(){},//有不异文件时实行ExtIn:[],//同意后缀名onNotExtIn:function(){},//不是同意后缀名时实行ExtOut:[],//克制后缀名,当设置了ExtIn则ExtOut有效onExtOut:function(){},//是克制后缀名时实行onFail:function(){},//文件欠亨过检测时实行(个中参数是file工具)onIni:function(){}//重置时实行};Extend(this.options,options||{});},//收拾空间Ini:function(){//收拾文件汇合this.Files=[];//收拾文件空间,把有值的file放进文件汇合Each(this.Folder.getElementsByTagName("input"),Bind(this,function(o){if(o.type=="file"){o.value&&this.Files.push(o);this.onIniFile(o);}}))//拔出一个新的filevarfile=document.createElement("input");file.name=this.FileName;file.type="file";file.onchange=Bind(this,function(){this.Check(file);this.Ini();});this.Folder.appendChild(file);//实行附加程序this.onIni();},//检测file工具Check:function(file){//检测变量varbCheck=true;//空值、文件数限定、后缀名、不异文件检测if(!file.value){bCheck=false;this.onEmpty();}elseif(this.Limit&&this.Files.length>=this.Limit){bCheck=false;this.onLimite();}elseif(!!this.ExtIn.length&&!RegExp(".("+this.ExtIn.join("|")+")$","i").test(file.value)){//检测是不是同意后缀名bCheck=false;this.onNotExtIn();}elseif(!!this.ExtOut.length&&RegExp(".("+this.ExtOut.join("|")+")$","i").test(file.value)){//检测是不是克制后缀名bCheck=false;this.onExtOut();}elseif(!!this.Distinct){Each(this.Files,function(o){if(o.value==file.value){bCheck=false;}})if(!bCheck){this.onSame();}}//没有经由过程检测!bCheck&&this.onFail(file);},//删除指定fileDelete:function(file){//移除指定filethis.Folder.removeChild(file);this.Ini();},//删除全体fileClear:function(){//清空文件空间Each(this.Files,Bind(this,function(o){this.Folder.removeChild(o);}));this.Ini();}}varfu=newFileUpload("uploadForm","idFile",{Limit:3,ExtIn:["jpg","gif"],onIniFile:function(file){file.value?file.style.display="none":this.Folder.removeChild(file);},onEmpty:function(){alert("请选择一个文件");},onLimite:function(){alert("凌驾上传限定");},onSame:function(){alert("已有不异文件");},onNotExtIn:function(){alert("只同意上传"+this.ExtIn.join(",")+"文件");},onFail:function(file){this.Folder.removeChild(file);},onIni:function(){//显现文件列表vararrRows=[];if(this.Files.length){varoThis=this;Each(this.Files,function(o){vara=document.createElement("a");a.innerHTML="作废";a.href="javascript:void(0);";a.onclick=function(){oThis.Delete(o);returnfalse;};arrRows.push([o.value,a]);});}else{arrRows.push(["<fontcolor=gray>没有增加文件</font>",""]);}AddList(arrRows);//设置按钮$("idBtnupload").disabled=$("idBtndel").disabled=this.Files.length<=0;}});$("idBtnupload").onclick=function(){//显现文件列表vararrRows=[];Each(fu.Files,function(o){arrRows.push([o.value,""]);});AddList(arrRows);fu.Folder.style.display="none";$("idProcess").style.display="";$("idMsg").innerHTML="正在增加文件到您的网盘中,请稍候……<br/>有大概由于收集成绩,呈现程序长工夫无呼应,请点击“<ahref=?><fontcolor=red>作废</font></a>”从头上传文件";//fu.Form.submit();}//用来增加文件列表的函数functionAddList(rows){//依据数组来增加列表varFileList=$("idFileList"),oFragment=document.createDocumentFragment();//用文档碎片保留列表Each(rows,function(cells){varrow=document.createElement("tr");Each(cells,function(o){varcell=document.createElement("td");if(typeofo=="string"){cell.innerHTML=o;}else{cell.appendChild(o);}row.appendChild(cell);});oFragment.appendChild(row);})//ie的table不撑持innerHTML以是如许清空tablewhile(FileList.hasChildNodes()){FileList.removeChild(FileList.firstChild);}FileList.appendChild(oFragment);}$("idLimit").innerHTML=fu.Limit;$("idExt").innerHTML=fu.ExtIn.join(",");$("idBtndel").onclick=function(){fu.Clear();}//在背景经由过程window.parent来会见主页面的函数functionFinish(msg){alert(msg);location.href=location.href;}</script></body></html></font><ahref="http://js.alixixi.com/">接待会见阿里西西网页殊效代码站,js.alixixi.com</a>
[Ctrl+A全体选择提醒:你可先修正部分代码,再按运转]专业性的服务。有的ASP商提供垂直型的应用服务,针对某一特定行业提供应用服务。 |
|