QQ网名大全

j**a万年历课程设计

<%@ page language="j**a" contenttype="text/html; charset=gb2312" %>
<%@ page language="j**a" import="j**a.util.*" %>
<%
string[] weekdays={"","日","一","二","三","四","五","六"};
string[] days=new string[42];
for(int i=0;i<42;i++)
days[i]="";

gregoriancalendar currentday = new gregoriancalendar();
int year= currentday.get(calendar.year);
int month=currentday.get(calendar.month);
int today=currentday.get(calendar.day_of_month);
int weekday=currentday.get(calendar.day_of_week);

string now=year+"年"+(month+1)+"月"+today+"日"+" 星期"+weekdays[weekday];

calendar th**month=calendar.getinstance();
th**month.set(calendar.month, month );
th**month.set(calendar.year, year );
th**month.setfirstdayofweek(calendar.sunday);
th**month.set(calendar.day_of_month,1);

int firstindex=th**month.get(calendar.day_of_week)-1;
int maxindex=th**month.getactualmaximum(calendar.day_of_month);
for(int i=0;i<maxindex;i++){
days[firstindex+i]=string.valueof(i+1);
}
%>

<html>
<head>
<title>简易万年历</title>
<link type="text/css" rel="stylesheet" href="<s2:url value='css/style.css'/>">
<script type="text/j**ascript">
function showtime(showwhere){
var now=new date();
var hour=now.gethours();
var minu=now.getminutes();
var sec=now.getseconds();

if(hour<10) hour="0"+hour;
if(minu<10) minu="0"+minu;
if(sec<10) sec="0"+sec;

showwhere.value=hour+":"+minu+":"+sec;
settimeout("showtime(time)",1000)
}
</script>
</head>
<body onload="showtime(time)">
<table width="210" border="0" align="center" cellspacing="1" >
<tr height="25"><td colspan="7" align="center" style="border:0 solid"><%=now%> <input type="text" style="border:0;background-color:#f9f9f9" d**able="true" id="time" size="9"></td></tr>
<tr height="25" bgcolor="#f0f0f0" align="center">
<td style="border:1 solid">日</td>
<td style="border:1 solid">一</td>
<td style="border:1 solid">二</td>
<td style="border:1 solid">三</td>
<td style="border:1 solid">四</td>
<td style="border:1 solid">五</td>
<td style="border:1 solid">六</td>
</tr>
<tr height="4"><td colspan="7"></td></tr>
<% for(int j=0;j<6;j++) { %>
<tr>
<%
for(int i=j*7;i<(j+1)*7;i++) {
if((i-firstindex+1)==today){%>
<td width="30" height="23" align="center" bgcolor="gray" style="border:1 solid"><font color="#ffffff"><b><%=days[i]%></b></font></td>
<% }else{ %>
<td width="30" height="23" align="center" style="border:1 solid"><%=days[i]%></td>
<% }
}%>
</tr>
<% } %>
<tr height="10"><td colspan="7"></td></tr>
</table>
</body>
</html>

jsp日历...差不多的...
佚名
2024-06-06 14:32:06
最佳回答
类似问题(10)
  • 佚名
    2024-06-06 16:10:03

    j**a教程易学吗,哪有?

    朋友你想学这个是很容易的,刚开始我是零基础上慕课网学的。那的j**a教程案例多学起来容易上手还是不收费用的。 相信你也行

  • 佚名
    2024-06-06 02:52:48

    谁能用c++编写计算万年历程序啊?

    说实话,编写这样一个东东有点麻烦,况且lz只用零分~参考http://我去年编写的,里面没有“显示某一年某一个月的日历”的功能,但是你参考其他功能自己写一下吧。...

  • 佚名
    2024-06-06 15:14:45
  • 佚名
    2024-06-06 05:28:49

    中华万年历日程不重复设置

    打开中华万年历中华万年历---日程---多少天/月。。重复----切换为不重复

  • 佚名
    2024-06-06 08:00:00

    中华万年历日程不重复设置

    打开中华万年历中华万年历-日程-多少天/月。重复-切换为不重复

  • 佚名
    2024-06-06 08:00:00

    单片机c语言万年历设计

    呵呵,这个东西我最近做过。也用过ds1302、pcf8563时钟芯片,还算比较简单啦。只不过没这么多功能,这些日子正想做个跟手表一样多的功能。等做完了,发给你把...

  • 佚名
    2024-06-06 08:00:00

    室内设计培训课程能自学吗?

    室内设计培训课程能自学。  首先,是室内设计相关的电脑绘图知识,包括photoshop图像处理、cad制图、3dmax建模等,软件学习的时间比较的长,自学的话,...

  • 佚名
    2024-06-06 08:00:00

    c#窗体设计万年历怎么定义calendar

    它就是一个控件,你像定义什么?

  • 佚名
    2024-06-06 08:00:00

    跪求!!!51单片机万年历程序设计!!

    我有程序,而且实物已成功,是我的一个参赛作品,毕业设备也被人借过。你先看一下硬件及连线看行不。我的有你所说的功能,外加农历闰月日期、跑秒、温度显示、温度过高自动...

  • 佚名
    2024-06-06 08:00:00

    c语言程序设计万年历

    #include <stdio.h> int leap (int year) {if(year%4==0&&year%100!=0||ye...