首页 > 字体库 > 问答 > js怎么制作带节假日的日历,用jquery设计带农历和节假日日历方案

js怎么制作带节假日的日历,用jquery设计带农历和节假日日历方案

来源:整理 时间:2023-08-30 15:03:02 编辑:航空兔素材 手机版

1,用jquery设计带农历和节假日日历方案

jquery带农历和节假日日历查看演示请点击素材火网址:http://www.sucaihuo.com/js/856.html在页面载入日历框架(及iframe.html)<divclass="membder-background addMemo-body"><divclass="addMemo"id="iframe"><label>日期</label><inputtype="text"value="2015-10-10"id="J-xl"/><divclass="clear-both"></div><iframesrc="iframe.html"width="100%"height="600"id="iframepage"name="iframe"frameborder="0"scrolling="no"marginheight="0"marginwidth="0"></iframe></div></div>

用jquery设计带农历和节假日日历方案

2,如何用JavaScript编写一个万年历

网易126邮箱上有一个,你打开这个网址可以看到 http://mimg.126.com/assist/calendar/index.htm,把网页另存为本地文件就是万年历了。如果不懂网页源代码留下你的Email,我发你邮箱里面
import java.io.*; class putout{ public void putout(int f,int x,int y){ int i; int a[]= new int[40]; System.out.println(-#34; 日 一 二 三 四 五 六 -#34;+-#34; -#34;+f+-#34;月-#34;); for (i=0;i-#60;x;i++) {System.out.print(-#34; -#34;); } for(i=x;i-#60;x+y;i++) a[i]=i-x+1; for(i=x;i-#60;x+y;i++) { if ((i%7==0)-#38;-#38;(i-#62;0)) System.out.print(-#34;/n-#34;); if (a[i]-#60;10) System.out.print(-#34; -#34;+a[i]); else System.out.print(-#34; -#34;+a[i]); } System.out.println(-#34;/n-#34;); } } class st{ public static void main(String args[])throws IOException{ putout p=new putout(); int year,mouth,y=1,t,i; InputStreamReader ir; BufferedReader in; ir=new InputStreamReader(System.in); in=new BufferedReader(ir); System.out.print(-#34;请输入一个年份:-#34;); String s=in.readLine(); year=Integer.parseInt(s); if((year%4==0 -#38;-#38; year%100!=0)||(year%400==0)) mouth=1; else mouth=0; y=year; for(i=1;i-#60;year;i++) {if((i%4==0 -#38;-#38; i%100!=0)||(i%400==0)) y++;} y=y%7; for(i=1;i-#60;13;i++){ switch(i){ case 1: {p.putout(1,y,31);y=(y+31)%7;break;} case 2: {p.putout(2,y,28+mouth);y=(y+28+mouth)%7;break;} case 3: {p.putout(3,y,31);y=(y+31)%7;break;} case 4: {p.putout(4,y,30);y=(y+30)%7;break;} case 5: {p.putout(5,y,31);y=(y+31)%7;break;} case 6: {p.putout(6,y,30);y=(y+30)%7;break;} case 7: {p.putout(7,y,31);y=(y+31)%7;break;} case 8: {p.putout(8,y,31);y=(y+31)%7;break;} case 9: {p.putout(9,y,30);y=(y+30)%7;break;} case 10: {p.putout(10,y,31);y=(y+31)%7;break;} case 11: {p.putout(11,y,30);y=(y+30)%7;break;} case 12: {p.putout(12,y,31);y=(y+31)%7;break;} } } } }

如何用JavaScript编写一个万年历

文章TAG:js怎么制作带节假日的日历用jquery设计带农历和节假日日历方案

最近更新