使用JavaBean创建您的网上日历本(1)_MySQL
有的朋友曾经说过,如果有一个网上的日记本,或者一个网上的万年历能提醒自己到时去干什么事情就好了。其实呀,这样的日历本您自己也能做一个。不信你看下面的例子:
〈HTML〉
〈HEAD〉
〈TITLE〉万年历记事本〈/TITLE〉
〈/HEAD〉
〈BODY BGCOLOR ="white"〉
//设置页面脚本语言是java,导入HtmlCalendarNotePad类,HtmlCalendarNotePad在后面将会讲到
〈%@ page language="java" import="HtmlCalendarNotePad" %〉
//定义一个JavaBean,取其id为HtmlCal
〈jsp:useBean id="HtmlCal" scope="session" class="HtmlCalendarNotePad" /〉
〈%
// 设置参数,取所需的月份为3月,因为未设定年份,故默认为本年。
HtmlCal.setMonth(3);
//设置动作,3月24日时,去天极网,在新窗口打开(也可以以其他的方式打开)
HtmlCal.setAction(24,"http://www.yesky.com/","_blank");
%〉
〈TABLE WIDTH=300〉
〈TR〉〈TD NOWRAP〉
〈%=HtmlCal.getHtml()%〉 //以表格的形式输出一个月的月历
〈/TD〉〈/TR〉
〈/TABLE〉
〈/BODY〉
〈/HTML〉
你将看到如下输出结果
Mon Tue Wed Thu Fri Sat Sun
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
这不就跟日历本上一样了吗,不过它比日历本好在,有预设好的链接可以提醒您到时去某个站点,或 执行某个javascript函数,这样不又起了一个记事本的作用了吗?当然了,你也可以自己添加一些功能,使 它变得更加强大,比如添加一个表单,可以让用户填写日记发送到您的系统的数据库中等等。为了完成这个目的, 先让我们来看一看JavaBean程序是如何书写的。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

An important tool for organizing your daily work and routine in Windows 11 is the display of time and date in the taskbar. This feature is usually located in the lower right corner of the screen and gives you instant access to the time and date. By clicking this area, you can bring up your calendar, making it easier to check upcoming appointments and dates without having to open a separate app. However, if you use multiple monitors, you may run into issues with this feature. Specifically, while the clock and date appear on the taskbar on all connected monitors, the ability to click the date and time on a second monitor to display the calendar is unavailable. As of now, this feature only works on the main display - it's unlike Windows 10, where clicking on any

CrystalDiskMark is a small HDD benchmark tool for hard drives that quickly measures sequential and random read/write speeds. Next, let the editor introduce CrystalDiskMark to you and how to use crystaldiskmark~ 1. Introduction to CrystalDiskMark CrystalDiskMark is a widely used disk performance testing tool used to evaluate the read and write speed and performance of mechanical hard drives and solid-state drives (SSD). Random I/O performance. It is a free Windows application and provides a user-friendly interface and various test modes to evaluate different aspects of hard drive performance and is widely used in hardware reviews

foobar2000 is a software that can listen to music resources at any time. It brings you all kinds of music with lossless sound quality. The enhanced version of the music player allows you to get a more comprehensive and comfortable music experience. Its design concept is to play the advanced audio on the computer The device is transplanted to mobile phones to provide a more convenient and efficient music playback experience. The interface design is simple, clear and easy to use. It adopts a minimalist design style without too many decorations and cumbersome operations to get started quickly. It also supports a variety of skins and Theme, personalize settings according to your own preferences, and create an exclusive music player that supports the playback of multiple audio formats. It also supports the audio gain function to adjust the volume according to your own hearing conditions to avoid hearing damage caused by excessive volume. Next, let me help you

If your Outlook calendar cannot sync with Google Calendar, Teams, iPhone, Android, Zoom, Office account, etc., please follow the steps below to resolve the issue. The calendar app can be connected to other calendar services such as Google Calendar, iPhone, Android, Microsoft Office 365, etc. This is very useful because it can sync automatically. But what if OutlookCalendar fails to sync with third-party calendars? Possible reasons could be selecting the wrong calendar for synchronization, calendar not visible, background application interference, outdated Outlook application or calendar application, etc. Preliminary fix for Outlook calendar not syncing

The calendar can help users record your schedule and even set reminders. However, many users are asking what to do if calendar event reminders do not pop up in Windows 10? Users can first check the Windows update status or clear the Windows App Store cache to perform the operation. Let this site carefully introduce to users the analysis of the problem of Win10 calendar event reminder not popping up. To add calendar events, click the "Calendar" program in the system menu. Click the left mouse button on a date in the calendar. Enter the event name and reminder time in the editing window, and click the "Save" button to add the event. Solving the problem of win10 calendar event reminder not popping up

Cloud storage has become an indispensable part of our daily life and work nowadays. As one of the leading cloud storage services in China, Baidu Netdisk has won the favor of a large number of users with its powerful storage functions, efficient transmission speed and convenient operation experience. And whether you want to back up important files, share information, watch videos online, or listen to music, Baidu Cloud Disk can meet your needs. However, many users may not understand the specific use method of Baidu Netdisk app, so this tutorial will introduce in detail how to use Baidu Netdisk app. Users who are still confused can follow this article to learn more. ! How to use Baidu Cloud Network Disk: 1. Installation First, when downloading and installing Baidu Cloud software, please select the custom installation option.

The Lost Purchasing Office is confirmed to be updated at 11 am on February 28th. Players can go to Taobao to search the Purchasing Office and select the store category to purchase. This time we bring you the MBCC birthday party series and 2024 Desk Calendar peripherals. Come together. Take a look at the product details this time. No Period Lost Purchasing Office: New calendar and birthday series peripherals! There is something new in the Lost Procurement Office! - Pre-sale time: February 28, 2024 11:00 - March 13, 2024 23:59 Purchase address: Taobao search [Unexpected Lost Purchasing Office] Select [Store] category to enter the store for purchase; peripheral introduction: The new peripherals released this time are MBCC birthday party series and 2024 desk calendar peripherals. Please click on the long image for details. The Purchasing Office introduces new peripherals—MBCC students

NetEase Mailbox, as an email address widely used by Chinese netizens, has always won the trust of users with its stable and efficient services. NetEase Mailbox Master is an email software specially created for mobile phone users. It greatly simplifies the process of sending and receiving emails and makes our email processing more convenient. So how to use NetEase Mailbox Master, and what specific functions it has. Below, the editor of this site will give you a detailed introduction, hoping to help you! First, you can search and download the NetEase Mailbox Master app in the mobile app store. Search for "NetEase Mailbox Master" in App Store or Baidu Mobile Assistant, and then follow the prompts to install it. After the download and installation is completed, we open the NetEase email account and log in. The login interface is as shown below
