您好,欢迎光临本网站![请登录][注册会员]  
文件名称: JSP万年历 JSP万年历
  所属分类: 网络基础
  开发工具:
  文件大小: 375kb
  下载次数: 0
  上传时间: 2011-05-26
  提 供 者: drizz*****
 详细说明: <%@page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage=""%> <%@page language="java" import="java.util.*"%> 带有备忘录的万年历 <%!String days[];%> <% days = new String[42]; for (int i = 0; i < 42; i++) { days[i] = ""; } %> <% GregorianCalendar currentDay = new GregorianCalendar(); int today = currentDay.get(Calendar.DAY_OF_MONTH); int month = currentDay.get(Calendar.MONTH); int year = currentDay.get(Calendar.YEAR); if (request.getParameter("month") != null && request.getParameter("year") != null) { int requestMonth = Integer.parseInt(request.getParameter("month")); int requestYear = Integer.parseInt(request.getParameter("year")); if (requestYear == currentDay.get(Calendar.YEAR) && requestMonth == month) {} else if (requestMonth == -1) { month = 11; year = requestYear - 1; } else if (requestMonth == 12) { month = 0; year = requestYear + 1; } else { month = requestMonth; year = requestYear; } } Calendar thisMonth = Calendar.getInstance(); thisMonth.set(Calendar.MONTH, month); thisMonth.set(Calendar.YEAR, year); thisMonth.setFirstDayOfWeek(Calendar.SUNDAY); thisMonth.set(Calendar.DAY_OF_MONTH, 1); int firstIndex = thisMonth.get(Calendar.DAY_OF_WEEK) - 1; int maxIndex = thisMonth.getActualMaximum(Calendar.DAY_OF_MONTH); for (int i = 0; i < maxIndex; i++) { days[firstIndex + i] = String.valueOf(i + 1); } %> <% String allShowTime = year + "." + month + "." + today + "." + currentDay.get(Calendar.HOUR_OF_DAY) + "." + currentDay.get(Calendar.MINUTE); String sql = "select * from tb_calendar where showtime='" + allShowTime + "'"; ResultSet rs=connection.executeQuery(sql); try{ while(rs.next()){ %> <% } }catch(Exception e){} %>
<%=year%> 年 <%=month+1%> 月
<%for (int j = 0; j < 6; j++) { %> <%for (int i = j * 7; i < (j + 1) * 7; i++) { String showtime = String.valueOf(year) + "." + String.valueOf(month) + "." + days[i]; %> <%if ((i - firstIndex + 1) == today) { %> <% } else { %> <% } %> <%} %> <%} %>
周日 周一 周二 周三 周四 周五 周六
<%=days[i]%> <%=days[i]%>
<%if (year != currentDay.get(Calendar.YEAR) || month != currentDay.get(Calendar.MONTH)) { %> <%} %>
...展开收缩
(系统自动生成,下载前可以参看下载内容)

下载文件列表

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.
 相关搜索: 万年历 jsp
 输入关键字,在本站1000多万海量源码库中尽情搜索: