Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

jspÖÐÒÔ·þÎñÆ÷ʱ¼ä×÷ΪÆðʼ£¬ÏÔʾʱÖÓµÄС³ÌÐò

Ò»°ãµÄÍøÒ³¶¼ÓÐÕâÖÖ¹¦ÄÜ£ºÔÚÒ³ÃæÉ϶¯Ì¬ÏÔʾµ±Ç°Ê±¼ä£¬Õâ¸öµÄʵÏÖÒ²ºÜ¼òµ¥£¬»ù±¾ÉÏÒ»ÐдúÂë¾ÍʵÏÖÁË
<span id="curTime"></span>
<script type="text/javascript"><!--
setInterval("curTime.innerHTML=new Date().toLocaleString()+' ÐÇÆÚ'+'ÈÕÒ»¶þÈýËÄÎåÁù'.charAt(new Date().getDay());",1000);
// --></script>
ÎÒÔÚ×öOAµÄÒ»¸ö¿¼ÇÚ³ÌÐòʱ£¬Òª¶¯Ì¬ÏÔʾ·þÎñÆ÷µÄʱ¼ä£¬ÈÃÔ±¹¤ÖªµÀµ±Ç°ÊÇ·ñ¿ÉÒÔÏ°࣬¶ø¿Í»§»úÓÉÓÚÖÖÖÖÔ­Òòʱ¼äÓë·þÎñÆ÷²¢²»Ò»Ö£¬ËùÒÔ²»ÄÜÓÃÉÏÃæµÄ´úÂ룬¸Ä½øÁËһϣº
<span id="curTime"></span>
<script type="text/javascript"><!--
// Ò³ÃæÒª¿ªÊ¼¼ÆʱµÄÈÕÆÚ£¨Ò»°ãÊÇ·þÎñÆ÷ÈÕÆÚ£©,±ÈÈç2010-01-12 11:34:55¿ªÊ¼¼Æʱ
var beginAdd = new Date(2010,0,12,11,34,55);
var beginDate = new Date();
    function ShowTime() {
     var now = new Date();
     var diff = (now - beginDate);
     beginAdd.setMilliseconds(beginAdd.getMilliseconds() + diff);
     beginDate = now;
document.getElementById("curTime").innerHTML = beginAdd.toLocaleString()+' ÐÇÆÚ'+'ÈÕÒ»¶þÈýËÄÎåÁù'.charAt(beginAdd.getDay());
}
    setInterval("ShowTime();",1000);
// --></script>
×îºó¼ÓÉÏÒ»¸ömeizzµÄ¸ñʽ»¯º¯Êý£¨ÂÔÓÐÐÞÕý£©£¬×îÖÕ°æÈçÏ£º
<span id="curTime"></span>
<script type="text/javascript"><!--
// Ò³ÃæÒª¿ªÊ¼¼ÆʱµÄÈÕÆÚ£¨Ò»°ãÊÇ·þÎñÆ÷ÈÕÆÚ£©,±ÈÈç2010-01-12 11:34:55¿ªÊ¼¼Æʱ
var beginAdd = new Date(2010,0,12,11,34,55);
var beginDate = new Date();
    function abc() {
     var now = new Date();
     var diff = (now - beginDate);
     beginAdd.setMilliseconds(beginAdd.getMilliseconds() + diff);
     beginDate = now;
document.getElementById("curTime").innerHTML = beginAdd.format("yyyyÄêMMÔÂddÈÕ hh:mm:ss ÐÇÆÚW");
}
    setInterval("abc();",1000);
    Date.prototype.format = functi


Ïà¹ØÎĵµ£º

jspѧϰ


 <c:if>ÓÃÓÚ
Á÷³Ì¿ØÖÆ
  
Óï·¨
1:
<c:if
test=”testCondition” var=”varName”
[scope=”page|request|session|application”]/>
  Óï·¨
2:
  <c:if
test=”testCondition” var=”varName”
[scope=&rdquo ......

jspºÍServletÖÐÎÄÂÒÂë»ã×Ü

1.           jspÒ³ÃæÏÔʾÖÐÎÄÂÒÂ룺
 
jspÒ³ÃæµÄ±àÂ뷽ʽÓÐÁ½¸öµØ·½ÐèÒªÉèÖãº
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page contentType="text/html;charset=utf-8"%>
ÆäÖУºpageEncoding Ö¸µÄÊÇjspÎļþ±¾É ......

JSPÖÐincludeÖ¸ÁîºÍincludeÐÐΪÇø±ð

 ÎÒÃǶ¼ÖªµÀÔÚjspÖÐincludeÓÐÁ½ÖÖÐÎʽ,·Ö±ðÊÇ
<%@ include file=” ”%>
<jsp:include page=” ” flush=”true”/>
    Ç°ÕßÊÇÖ¸ÁîÔªËØ¡¢ºóÕßÊÇÐÐΪԪËØ¡£¾ßÌåËüÃǽ«Ôںδ¦Óã¿ÈçºÎÓü°ËüÃÇÓÐʲôÇø±ð£¿ÕâÓ¦¸ÃÊǺܶàÈË¿´ ......

jspºÍActionÖÐBase64±àÂëת»»

jspÖÐÓÃjavascript½«ÖÐÎÄBase64תÂë, ActionÖÐÔÙÓÃBase64½âÂë
javascriptÖÐʹÓÃwebtoolkit.base64.js,ÏÂÔصØÖ·http://www.webtoolkit.info/djs/webtoolkit.base64.js
Ïà¹Ø½éÉÜ http://www.webtoolkit.info/javascript-base64.html
/**
*
*  Base64 encode / decode
*  http://www.webtoolkit.info/
*
**/ ......

JSP ¾ø¶Ô·¾¶ ÖÕ¼«½â¾ö·½°¸

context.xml Îļþ¼ÐÖÐ
<Context path="/wap"
docBase="D:\IDE\MyEclipse\wap\WebRoot" reloadable="false" >
request.getContextPath(); -==> /wap
this.getServletContext().getRealPath("") ;// D:\IDE\MyEclipse\wap\WebRoot
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ