Use JavaBean to create your online calendar this (1) _jsp programming
Source: Internet
Author: User
Some friends have said that if there is an online diary, or an online calendar can remind themselves to do things on the good. Actually, you can do one of these calendars yourself. I don't believe you. See the following example:
〈html〉
〈head〉
〈title〉 million Calendar Notepad 〈/title〉
〈/head〉
〈body bgcolor = "white"
Set page scripting language is Java, import Htmlcalendarnotepad class, Htmlcalendarnotepad in the following will be mentioned
〈%@ page language= "java" import= "Htmlcalendarnotepad"%〉
Define a JavaBean whose ID is htmlcal
〈jsp:usebean id= "Htmlcal" scope= "session" class= "Htmlcalendarnotepad"/〉
〈%
Set the parameters, take the required month for March, because the year is not set, so the default for this year.
Htmlcal.setmonth (3);
Set action, March 24, go to Tenkine, open in a new window (or you can open it in a different way)
Htmlcal.setaction ("http://www.yesky.com/", "_blank");
%〉
〈table width=300〉
〈TR〉〈TD nowrap〉
〈%=htmlcal.gethtml ()%〉//prints a one month calendar in tabular form
〈/td〉〈/tr〉
〈/table〉
〈/body〉
〈/html〉
Isn't that the same as the calendar, but it's better than the calendar, with a preset link to remind you to go to a site, or to execute a JavaScript function, so you don't have a notepad anymore? Of course, you can also add some features to make it more powerful, such as adding a form, allowing users to fill in the diary sent to your system's database and so on. To accomplish this, let's take a look at how the JavaBean program is written.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.