Now the framework is popular, many commonly used page controls have been developed for people to call, such as the calendar of jquery, beautiful and convenient.
Years ago, I also made a calendar control myself, and then where it is already impossible, right vote as old photos hang up, have time to take a look.
In:
Http://pan.baidu.com/s/1sjuLD17
Download it is a javaweb project, put in Tomcat can be used. (Why get a Web project instead of an HTML package because the include is not good for HTML.) )
The Calendar control code and the picture are in the Calendar directory under Webroot.
The index.jsp under Webroot shows the use of the load control and the response function.
<%@ Page Language="Java"Import="java.util.*"pageencoding="iso-8859-1"%><%StringPath=Request.getcontextpath ();StringBasePath=Request.getscheme ()+"://"+Request.getservername ()+":"+Request.getserverport ()+Path+"/";%><!DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en"><HTML> <Head> <Basehref= "<%=basePath%>"> <title>My JSP ' index.jsp ' starting page</title> <Metahttp-equiv= "Pragma"content= "No-cache"> <Metahttp-equiv= "Cache-control"content= "No-cache"> <Metahttp-equiv= "Expires"content= "0"> <Metahttp-equiv= "keywords"content= "Keyword1,keyword2,keyword3"> <Metahttp-equiv= "description"content= "This is my page"> <!--<link rel= "stylesheet" type= "Text/css " href= "Styles.css" > - </Head> <Body> <Div>Canlendar Show</Div> <inputtype= "text"ID= "Datetxt" /> <imgsrc= "Calendar/img/icon.png"onclick= "Popupcalendar (this, ' Datetxt ')"/><BR/> <!--onclick after the response function-- <Button>Submit</Button> <Jsp:includepage= "calendar/calendar.jsp"Flush= "true" /> <!--load the Calendar control just this one sentence -- </Body></HTML>
The page uses the following effects:
1. Before clicking on the calendar icon
2. Click the calendar icon to display the calendar
3. After selecting the date
Finish
A Web Calendar control that was created many years ago