欢迎您使用审批系统!该系统主要面向银行内部人员,但也为客户提供一些信息." 登陆,注册和管理员入口"项目专为银行内部人员设计."客户登陆,注册,贷款须知和预约"项目专为客户设计.客户可通过这些窗口浏览

源代码在线查看: time.js

软件大小: 611 K
上传用户: delsboy
关键词: 项目 窗口
下载地址: 免注册下载 普通下载 VIP

相关代码

				
				
				//  user InitToAll(年option'name,月option'name,日option'name,form'name)
				// send 2000 03 30
				// -----sample  html---------
				//
				//
				//
				// this is sample time optin 
				// this can do 2 month change!
				// InitToAll('yearname','monthname','dayname','form1');
				////InitToAll(yearname,monthname,dayname,formname,firstyear,yearspan,direction)
				//
				//---- end----
				
				
				function fGetDaysInMonth(iMonth, iYear) {
					//var dPrevDate = new Date(iYear, iMonth, 0);
				
				
				  if(iMonth==1|iMonth==3|iMonth==5|iMonth==7|iMonth==8|iMonth==10|iMonth==12)
				     {
					    return 31;
					 }
				  
				  if(iMonth==4|iMonth==6|iMonth==9|iMonth==11)
				     {
					    return 30;
					 } 
					 var frun,frun1,frun2;
				
					frun=Math.floor(iYear/4) * 4;
					frun1=Math.floor(iYear/100)*100
					frun2=Math.floor(iYear/400)*400
				    if(frun1==iYear)
					{
					   if(frun2==iYear)
					      return 29;
				       else
					      return 28;
				    }
					else
					{
				       if(frun==iYear)
					   {return 29;}
				       else
					   {return 28;}
					 }
					
				}
				function changeday(dayname,monthname,yearname,formname)
				{     
				 
						sgetyear="syear=document." + formname + "." + yearname + ".options[document." + formname + "." + yearname+ ".options.selectedIndex].text";
				
				
				        eval(sgetyear);
				
				        sgetmonth="smonth=document." + formname + "." + monthname + ".options[document." + formname + "." + monthname + ".options.selectedIndex].text";
				       eval(sgetmonth);
				    
				       bigestday=fGetDaysInMonth(smonth,syear)
				
				       sStr = "document." +formname+"." + dayname + ".length=" + bigestday;
				       eval(sStr);
				       today=new Date();
				       day1=today.getDate();
				      
				       for (loop=1; loop 				       {     
				            loop1=loop-1;
				            sStr="document."+formname+"." + dayname + ".options[" + loop1 + "].text='"+loop+"'";
				            eval(sStr);
				            if(loop				            {
				                sStr="document."+formname+"." + dayname + ".options[" + loop1 + "].value='0"+loop+"'"; 
				            }
				            else
				                sStr="document."+formname+"." + dayname + ".options[" + loop1 + "].value='"+loop+"'"; 
				              eval(sStr);
				       }
				        // sStr="document."+formname+"." + dayname + ".options[5].Selected=true";  
				      //eval(sStr);
				  
				
				}
				function InitToMonth(yearname,monthname,dayname,formname,ch)
				{ 
				   var loop;
				   var month1;
				   today=new Date();
				   if (ch=="")
				         month1=today.getMonth()+1;
				   else
				      month1= parseInt(ch);
				  // monthji=month1;
				   var sOut;
				   sOut = "				   sOut = sOut + monthname + "' onChange=changeday('" + dayname + "','" + monthname + "','" + yearname + "','" + formname + "')>";
				   document.writeln(sOut);
				   //alert(sOut);
				   for (loop=1; loop 				     {   
				    
					     if(loop						 {
							if(month1==loop)
								   sOut = "							else
								   sOut = "					     }
						 else
						 {
						      if(month1==loop)
							   sOut = "							  else
							    sOut = "						 }
						 sOut = sOut + "'>" + loop + "";
						 document.writeln(sOut);
				
				     }
				
				 document.writeln("");
				   
				}
				
				function InitToYear(yearname,monthname,dayname,formname,ch,yearspan,direction)
				{
				
				   today=new Date();
				     if (ch==""){
				         year=2000;
				
					 }
				     else
				        year= parseInt(ch);
						//yearji=year;
					
				   str="";
				
				document.writeln(str);
				 //  document.writeln("				  // document.writeln(ocxName+">");
				//document.writeln(ocxName);
				    
				   //document.writeln("");
				   if(direction=='up'){
				   for (loop=year; loop < parseInt(year)+parseInt(yearspan); loop++)
				     {
				          // 22222
				         if (loop==year)
				         
				    	 document.writeln("						 else
				    	 document.writeln("				         document.writeln(loop) ;
				         document.writeln(">");
				         document.writeln(loop);
				         document.writeln("");
				     }
				   }
				   else if(direction=='down'){
				   for (loop=year; loop > year-yearspan; loop--)
				     {
				          // 22222
				         if (loop==year)
				         
				    	 document.writeln("						 else
				    	 document.writeln("				         document.writeln(loop) ;
				         document.writeln(">");
				         document.writeln(loop);
				         document.writeln("");
				     }
				   }
				  
				
				 document.writeln("");
				   
				}
				function InitToDay(yearname,monthname,dayname,formname,ch)
				{  
				    var day1;
				 
				   today=new Date();
				   if (ch=="")
				   {
				      day1=today.getDate();
				   }
				  
				   else
				   {
				   day1= parseInt(ch);
				   }
				sgetyear="syear=document." + formname + "." + yearname + ".options[document." + formname + "." + yearname+ ".options.selectedIndex].text";
				
				
				        eval(sgetyear);
				
				        sgetmonth="smonth=document." + formname + "." + monthname + ".options[document." + formname + "." + monthname + ".options.selectedIndex].text";
				       eval(sgetmonth);
				    
				       bigestday=fGetDaysInMonth(smonth,syear);
				   //bigestday=fGetDaysInMonth(monthji,yearji) ;
				   document.writeln("				   document.writeln(dayname+">");
				
				   var sOut;
				   var sAll="";
				   for (loop=1;	loop 					 {	 
					     if(loop						 {
							if(day1==loop)
								   sOut = "							else
								   sOut = "					     }
						 else
						 {
						      if(day1==loop)
							   sOut = "							  else
							    sOut = "						 }
						 sOut = sOut + "'>" + loop + "";
						 document.writeln(sOut);
						 sAll = sAll + sOut + "\n";
					 }
				
				 document.writeln("");
				
				 }
				 function InitToAll(yearname,monthname,dayname,formname,firstyear,yearspan,direction)
				 {     
				       InitToYear(yearname,monthname,dayname,formname,firstyear,yearspan,direction);
				       document.writeln("年");          
				       InitToMonth(yearname,monthname,dayname,formname,'');
					   document.writeln("月");
					   InitToDay(yearname,monthname,dayname,formname,'');
					   document.writeln("日");
				 }
				 function InitToAll1(yearname,monthname,dayname,formname,firstyear,yearspan,direction)
				 {     
				       InitToYear(yearname,monthname,dayname,formname,firstyear,yearspan,direction);
				       document.writeln("年");          
				       InitToMonth(yearname,monthname,dayname,formname,'');
					   document.writeln("月");
					   InitToDay(yearname,monthname,dayname,formname,'');
					   document.writeln("日");
				 }			

相关资源