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日历...差不多的...
<%@ 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
问用j**a或者c或c++创建一个实用万年历日记本
答好说,怎么给你?
-
佚名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...
风水
- 1 周公解梦:朋友刮坏我的眉毛,我一生气自己把整条眉毛都给刮没了?代表什么意思?
- 2 做梦梦见自己手机电池被人卸掉拿走是怎么回事
- 3 周公解梦自己满嘴牙,还吐假牙,不带血
- 4 我是** 早上睡个回笼觉梦到很多条超大的蟒蛇在一条沟里 具体的记不清楚了 这预示着什么
- 5 昨晚我梦到眼镜蛇咬到我的小腿,无法针扎,之后就被吓醒了,这是怎么会事?
- 6 梦见吃酸糟辣是什么意思
- 7 梦到好多条平静,清撤的河水
- 8 梦见满地油菜花开,我还吃了根油菜杆。梦见太阳光强,刺得我睁不开眼。
- 9 梦见前夫的哥睡在我身边
- 10 请问入户门对面摆放鱼缸好吗?进门左面是厕所墙,正面可见沙发,右面是餐桌和厨房。鱼缸就放在沙发旁边。
起名
网名
- 1 柒网名右风
- 2 拼音微信网名大全
- 3 有没有单纯的网名男生
- 4 卖玉石起个什么网名好
- 5 皆不如你对应网名
- 6 麻烦微信网名
- 7 王祖贤的昵称
- 8 1314qq昵称
- 9 起艺名或昵称
- 10 微信如何修改群内昵称
说说
- 1 qq阳光男孩网名与签名
- 2 简短说说6
- 3 寂寞空虚冷的说说
- 4 伤感说说520
- 5 空间说说句子伤感说说
- 6 朋友算屁的说说
- 7 最新更新的说说
- 8 夜来临的说说
- 9 早上朋友圈搞笑的说说
- 10 不帮带孩子的婆婆下场的说说