惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Forbes - Security
Forbes - Security
GbyAI
GbyAI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
S
SegmentFault 最新的问题
Y
Y Combinator Blog
Recorded Future
Recorded Future
博客园 - Franky
I
InfoQ
T
The Blog of Author Tim Ferriss
Recent Announcements
Recent Announcements
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园_首页
阮一峰的网络日志
阮一峰的网络日志
T
Tailwind CSS Blog
Cyberwarzone
Cyberwarzone
The Register - Security
The Register - Security
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
雷峰网
雷峰网
P
Palo Alto Networks Blog
G
GRAHAM CLULEY
Cloudbric
Cloudbric
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
MongoDB | Blog
MongoDB | Blog
F
Full Disclosure
Google DeepMind News
Google DeepMind News
Recent Commits to openclaw:main
Recent Commits to openclaw:main
C
Check Point Blog
爱范儿
爱范儿
The GitHub Blog
The GitHub Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
W
WeLiveSecurity
T
Threat Research - Cisco Blogs
U
Unit 42
N
Netflix TechBlog - Medium
The Cloudflare Blog
Spread Privacy
Spread Privacy
Microsoft Azure Blog
Microsoft Azure Blog
美团技术团队
T
Troy Hunt's Blog
Engineering at Meta
Engineering at Meta
H
Heimdal Security Blog
TaoSecurity Blog
TaoSecurity Blog
C
Cybersecurity and Infrastructure Security Agency CISA
T
Tenable Blog
B
Blog
S
Securelist
H
Hacker News: Front Page
Google Online Security Blog
Google Online Security Blog
G
Google Developers Blog

博客园 - qqhe325

一个js游戏 向del.icio.us学习 lucene.net优化总结 Fxcop使用笔记 web service 记录1 自定义加密web.config实验记录 DTC:该伙伴事务管理器已经禁止了他对远程/网络事务的支持 C#基础- 抽象类,静态类 img的onload事件 当图片路径超出网站根目录时 vs2005宏的问题 asp.net 2.0 access 未指定的错误 oledbparameter在update时出错不报错 grove 小例子 delegate和event例子 你试图打开的项目是Web项目,请指定URL路径 asp.net 在分析向此请求提供服务所需资源时出错 策略模式 我们是怎样的一代人[转]
js自动加载日期类
qqhe325 · 2007-09-17 · via 博客园 - qqhe325

  1 // JScript 文件
  2 //Zeit:2007_01_11
  3 //Ort:sh
  4 //Tunesmith:a4647
  5 //Funktion:自动加载日期类,不需要验证日期的正确性,在原下拉类增加自动加载日期能力
  6 //忘了是从哪找的一个自动加载下一级的类,我给加上了自动加载正确的日期
  7 function daten(sel)    //choose date
  8 
  9   var me=this;
 10   this.$=function(o){
 11   return document.getElementById(o);
 12   }
 13   this.sub =function(i,vip){
 14      for (var j=i+1; j<sel.length; j++)
 15      {
 16         me.$(sel[j]).length = 0;
 17         me.$(sel[j]).options[0= new Option("请选择""");
 18      }
 19      if(i=='-1')
 20      {
 21        var today=new Date();
 22        for(var k=today.getYear()-4;k<today.getYear()+4;k++)
 23        me.$(sel[i+1]).options[me.$(sel[i+1]).length] = new Option(k,k);
 24      }
 25      if(vip.length==4)
 26      {
 27        for(var k=1;k<13;k++)
 28        {
 29        me.$(sel[i+1]).options[me.$(sel[i+1]).length] = new Option(k,k);
 30        }
 31      
 32      }
 33      if(i=='1')
 34      {
 35        switch(vip)
 36        {
 37        //case '1','3','5','7','8','10','12':
 38        case '1':
 39        case '3':
 40        case '5':
 41        case '7':
 42        case '8':
 43        case '10':
 44        case '12':
 45            for(var k=1;k<=31;k++)
 46            {
 47              me.$(sel[i+1]).options[me.$(sel[i+1]).length] = new Option(k,k);
 48            }
 49        
 50            break;
 51        case '4':
 52        case '6':
 53        case '9':
 54        case '11':
 55            for(var k=1;k<=30;k++)
 56            {
 57              me.$(sel[i+1]).options[me.$(sel[i+1]).length] = new Option(k,k);
 58            }
 59        
 60            break;
 61        case '2':
 62            var boolleapyear=false;
 63            if(((me.$(sel[0]).value)%100)==0){
 64              if(((me.$(sel[0]).value)%400)==0)
 65              boolleapyear=true;
 66            }
 67            else{
 68              if(((me.$(sel[0]).value)%4)==0)
 69              boolleapyear=true;
 70            }
 71            if(boolleapyear)
 72            {
 73             for(var k=1;k<=29;k++)
 74            {
 75              me.$(sel[i+1]).options[me.$(sel[i+1]).length] = new Option(k,k);
 76            }
 77          
 78            }
 79            else
 80            {
 81             for(var k=1;k<=28;k++)
 82            {
 83              me.$(sel[i+1]).options[me.$(sel[i+1]).length] = new Option(k,k);
 84            }
 85         
 86            }
 87         
 88            break;
 89        }
 90    
 91           
 92      }
 93   }
 94   this.init = function(){
 95     me.sub(-1,0);
 96    for (var i=0; i<sel.length; i++)//i<sel.length-1
 97    {
 98        me.$(sel[i]).onchange = function()
 99       {
100          //alert('b');
101         
102          for (i=0;me.$(sel[i])!=this; i++);
103          
104          me.sub(i, me.$(sel[i]).value);
105          //alert('a');
106      
107          
108       }
109    }
110 }
111 this.init();
112 }
113