COOL而实用的动态效果
软件发布|下载排行|最新软件
<script language="javascript" type="text/javascript" src="array.js"></script>
/****************************************************************** 此代码为FLYINGFISH原创,你可以免费使用,修改完善。但作为对作者和对你自己的尊重,务必保留此原始版权信息, DESIGNED BY: flyingfish WEB SITE: www.yu5911.cn EMAIL:penglongxiang@gmail.com QQ: 55856710
******************************************************************/
Array.prototype.remove = function(index){ if(isNaN(index)||(index>=this.length)||(index<0)) return false; this.splice(index,1); return true; }
Array.prototype.del=function(n) { //n表示第几项,从0开始算起。 //prototype为对象原型,注意这里为对象增加自定义方法的方法。 if(n<0) //如果n<0,则不进行任何操作。 return this; else return this.slice(0,n).concat(this.slice(n+1,this.length)); /* concat方法:返回一个新数组,这个新数组是由两个或更多数组组合而成的。 这里就是返回this.slice(0,n)/this.slice(n+1,this.length) 组成的新数组,这中间,刚好少了第n项。 slice方法: 返回一个数组的一段,两个参数,分别指定开始和结束的位置。 */ }
Array.prototype.indexOf = function(value){ for(var i=0;i Array.prototype.contains = function(value){ return this.indexOf(value)>=0; } Array.prototype.clear = function(){ while(this.length>0) this.remove(this.length-1); } Array.prototype.add = function(index,value){ if(value==undefined) this.put(index); else{ var len = this.length; this.push(this[len-1]); for(var i=len-1;i>index;i--) this[i] = this[i-1]; this[index] = value; } } Array.prototype.put = function(value){ if(!this.contains(value)) this.push(value); } Array.prototype.circle = function(degressive){ if(degressive){ var a = this[0]; for(var i=0;i0;i--) this[i] = this[i-1]; this[0] = a; } } var selectedID = new Array() var months,days,temp_m,temp_d,temp_m1,temp_d1,isSelected=false,datedata=""; /https://img.qb5200.com/download-x/document.write('') for(t=1;t<13;t++){ datedata =datedata + '' for(i=1;i<=42;i++){ datedata =datedata +' '+i+'' } datedata =datedata +'' } datedata = ''+datedata+"" /https://img.qb5200.com/download-x/document.write('')
Array.prototype.contains = function(value){ return this.indexOf(value)>=0; }
Array.prototype.clear = function(){ while(this.length>0) this.remove(this.length-1); }
Array.prototype.add = function(index,value){ if(value==undefined) this.put(index); else{ var len = this.length; this.push(this[len-1]); for(var i=len-1;i>index;i--) this[i] = this[i-1]; this[index] = value; } }
Array.prototype.put = function(value){ if(!this.contains(value)) this.push(value); }
Array.prototype.circle = function(degressive){ if(degressive){ var a = this[0]; for(var i=0;i0;i--) this[i] = this[i-1]; this[0] = a; } } var selectedID = new Array() var months,days,temp_m,temp_d,temp_m1,temp_d1,isSelected=false,datedata="";
/https://img.qb5200.com/download-x/document.write('
function selectDate(startM,endM,startD,endD){ for(m = startM;m<=endM;m++){ for(d = startD;d<=endD;d++){ tid=document.getElementById("m"+m+"d"+d) if(tid!=null){ if(tid.className!="bg_green"){ if(selectedID.indexOf("m"+m+"d"+d)!=-1){ did =selectedID.indexOf("m"+m+"d"+d) selectedID.remove(did) tid.className="inactive" }else{ selectedID.put("m"+m+"d"+d) tid.className="bg_red" } } } } } document.getElementById("report").innerHTML="共选中"+selectedID.length+"个数据"+selectedID; } function selectAll(v){ if(v){ resetAll(); selectDate(1,months,1,days) }else{ selectDate(1,months,1,days) } } function resetAll(){ if(selectedID.length>0){ for(k=1;k<=selectedID.length;k++){ did=document.getElementById(selectedID[k-1]) did.className="inactive"; } selectedID.clear(); document.getElementById("report").innerHTML="共选中"+selectedID.length+"个数据"+selectedID; } } function selectMonth(month){ month = month.parentNode.rowIndex+1 selectDate(month,month,1,days) } function selectDay(day){ day = day.cellIndex + 1; selectDate(1,months,day,day) }
window.onload=function () { dayObj = document.getElementById("days"); monthObj = document.getElementById("months") days = dayObj.rows[0].cells.length //get days months = monthObj.rows.length // get Months var obj=document.getElementById("dataTable"); var eventObj; //creatDateData document.getElementById("dataTable").innerHTML=datedata /https://img.qb5200.com/download-x/document.body.innerText=document.body.innerHTML obj.onmousedown=function(event) { if(event == null){ event = window.event; // For IE } var eventObj = event.srcElement? event.srcElement : event.target; // IE use srcElement, Firefox use target if(eventObj.tagName=="td"||eventObj.tagName=="TD") { xy=eventObj.getAttribute("name").split("d"); temp_d=parseInt(xy[1]) temp_m=parseInt(xy[0].split("m")[1]) selectDate(temp_m,temp_m,temp_d,temp_d) } } obj.onmouseup=function(event) { if(event == null){ event = window.event; // For IE } var eventObj = event.srcElement? event.srcElement : event.target; // IE use srcElement, Firefox use target if(eventObj.tagName=="td"||eventObj.tagName=="TD") { xy=eventObj.getAttribute("name").split("d"); temp_d1=parseInt(xy[1]) temp_m1=parseInt(xy[0].split("m")[1]) sM=temp_m </script> 2006 M T W T F S S M T W T F S S M T W T F S S M T W T F S S M T W T F S S M T W T F S S Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
</script>
R语言安装辑程包不存在 解决R语言安装时出现辑程包不存在的问题
Permission denied解决方法 Permission denied的解决办法
VSCode配置python环境
使用axios发送post请求
使用@Cacheable设置缓存的过期时间
uniapp地图组件(map)使用
axios配置请求头content-type
如何在SPSS软件中绘制饼图
Copyright 2022 版权所有 软件发布 访问手机版
声明:所有软件和文章来自软件开发商或者作者 如有异议 请与本站联系 联系我们