JSPÔ´´úÂë´óÈ« µ¹¼ÆÊ±´úÂëÉú³ÉÆ÷
Çë²ÎÕÕÒÔϵÄÔ´úÂ룬עÒ⣺¿ÉÒÔÌæ»»JavaScriptÂëÖеÄ2007
ÒÔÏÂÊÇÍøÒ³Ô´´úÂë
<!-- ·ÖÈý²½Íê³ÉÈ«²¿½Å±¾:
1. ½«µÚÒ»²¿·ÖÕ³Ìùµ½HTMLµÄHEADÇø
2. ½«OnLoadʼþ¼ÓÈëBODY±êÇ©ÄÚ
3. ½«×îºóÒ»²¿·Ö´úÂë¼ÓÈëBODYÇø -->
<!-- µÚÒ»²½: ½«ÈçÏ´úÂëÕ³Ìùµ½HTMLµÄHEADÇø-->
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var Temp2;
var timerID = null;
var timerRunning = false;
function arry() {
this.length = 12;
this[0] = 31;
this[1] = 28;
this[2] = 31;
this[3] = 30;
this[4] = 31;
this[5] = 30;
this[6] = 31;
this[7] = 31;
this[8] = 30;
this[9] = 31;
this[10] = 30;
this[11] = 31;
}
var date = new arry();
function stopclock() {
if(timerRunning)
clearTimeout(timerID);
timerRunning = false;
}
function startclock() {
stopclock();
showtime();
}
function showtime() {
now = new Date();
var CurMonth = now.getMonth();
var CurDate = now.getDate();
var CurYear = now.getFullYear();
now = null;
if (1 < CurDate) {
CurDate -= date[CurMonth]; CurMonth++;
}
if (0 < CurMonth) {
CurMonth -= 12; CurYear++;
}
var Yearleft = 2007 - CurYear;
var Monthleft = 0 - CurMonth;
var Dateleft = 1 - CurDate;
document.dateform.a.value = Yearleft;
document.dateform.b.value = Monthleft;
document.dateform.c.value = Dateleft;
timerID = setTimeout("showtime()",1000);
timerRunning = true;
}
// End -->
</script>
</HEAD>
<!-- µÚ¶þ²½£º½«OnLoadʼþ¼ÓÈëBODY±êÇ©ÄÚ -->
<BODY Onload="startclock()">
<!-- µÚÈý²½£º½«×îºóÒ»²¿·Ö´úÂë¼ÓÈëBODYÇø -->
<form name=dateform>¾àÀë2007»¹ÓÐ
<input type=text name=a size=2 value="">Äê
<input type=text name=b size=2 value="">ÔÂ
<input type=text name=c size=2 value="">Ìì
</form>
<!-- ´úÂ볤¶È: 1.95 KB -->
Ïà¹ØÎĵµ£º
JspµÄ¾ÅÖÖ¶ÔÏóÎÒ¼òÊöÖ®£º
page
application
request
response
session
config
out
pageContext
page
<%@page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %>
response
<%
response.setHeader("Pragma","No-cache");
respons ......
JSPÖеÄÌø×ª£º
(1). forward()·½·¨
ʹÓõ½javax.servlet.RequestDispatcherÀà
RequestDispatcher rd = getServletContext().getRequestDispatcher("url");
rd.forward(requestVar,requestVar); //´«µÝservletµÄÈë¿Ú²ÎÊý
/*forwardº¯ÊýÒѾ°ÑÔÒ³ÃæµÄrequest,response¶ÔÏó´«ÈëеÄÒ³Ãæ£¬Òò´ËÕâо ......
<%@ page contentType="text/html;charset=GBK"%>
<div id="divDisable" style="display: none;width:expression(document.body.offsetWidth); height:100%; z-index: 1000; position: absolute;left: 0px; top: 0px;filter:alpha(opacity=50); background-color:White">
</div>
<div id="divWaiti ......
J2EE ̽Ë÷Õß:
´´½¨ºÍ¹ÜÀíÓÐ״̬ Web Ó¦ÓóÌÐò
¶Ô4ÖֻỰ×÷ÓÃÓòµÄÊʵ±´¦Àí
ÎĵµÑ¡Ïî
½«´ËÒ³×÷Ϊµç×ÓÓʼþ·¢ËÍ
ÍØÕ¹ Tomcat Ó¦ÓÃ
......