Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB
ÈÈÃűêÇ©£º c c# c++ asp asp.net linux php jsp java vb Python Ruby mysql sql access Sqlite sqlserver delphi javascript Oracle ajax wap mssql html css flash flex dreamweaver xml
 ×îÐÂÎÄÕ : jsp

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);
     beginDat ......

jspÖеÄ×Ô¶¨Òå±êÇ©µÄÓ÷¨


±àд×Ô¶¨Òå±êÇ©²½Öè
 
 ±àд±êÇ©´¦ÀíÆ÷£¨´¦Àí±êÇ©µÄJavaÀࣩ£¬ÕâЩÀàÐèҪʵÏÖһЩ¹æ·¶»¯µÄ±êÇ©½Ó¿Ú
 ±àд±êÇ©¿âÃèÊöÎļþ£¨TLD£©£¬Õâ¸öÎļþÃèÊöÁËÿ¸ö±êÇ©ºÍ¶ÔÓ¦µÄJava±êÇ©´¦ÀíÆ÷ÀàÖ®¼äµÄÓ³Éä¹Øϵ
 ÔÚweb.xmlÖÐÅäÖñêÇ©¿âÎļþµÄURI
 ÔÚJSPÒ³ÃæÖÐÀûÓÃtaglibÖ¸Á±êÇ©¿âÒýÈëµ½Ò³ÃæÖÐ
 
¾ßÌåÄÚÈݲο¼¿Î¼þÁË¡£Ö»ËµÒ»Ð©×¢ÒâµÄµØ·½£º
 
 
         ¶¨Òå±êÇ©µÄ´¦ÀíµÄÊÇÒ»¸öÀ࣬¶ø²»ÊÇÒ»¸öservlet£¬ËùÒÔн¨µÄʱºòÔÚMyEclipseÖÐÑ¡Ôñн¨Ò»¸öclass£¬²¢ÇÒ×¢ÒâÒ»¶¨Òª·ÅÔÚÒ»¸ö°üÀ²»ÄÜÖ±½ÓÓÃdefaultpackage,ÏÖÔÚ»¹²»ÖªµÀ½â¾ö°ì·¨¡£
        Õû¸ö¹ý³ÌÊÇÕâÑùµÄ£º
        jspÖÐʹÓñêÇ©£¬µ±Ò³Ãæ·¢ÏÖ²»ÄÜÔÚĬÈϵıêÇ©¿âÖÐÕÒµ½µÄʱºò£¬»á²éÕÒ<%@ taglib uri="tagliburi" prefix="taglibprefix" %>
        È»ºó»áµÃµ½´¦ÀíÕâ¸ö±êÇ©µÄ¶ÔÓ¦µÄtagliburi£¬
       ÔÚweb.xmlÖÐÕÒµ½´¦ÀíÕâ¸öuri¶ÔÓ¦µÄtaglib.tld,
<taglib>
<taglib-uri>/mytaglib</taglib-uri>
<taglib-locatio ......

¹ØÓÚ¸´Ñ¡¿òµÄÑéÖ¤ÓëjspÈ¡Öµ(תÔØ)

±íµ¥ÈçÏ£º
<form name="form1" action="test.jsp" method="post" onsubmit="return checkData();">
   <input name="checkall1" type="checkbox" value="0" onClick="checkAllBox(this);"/>È«Ñ¡<br>
   <input name="answer" type="checkbox" value="a"/>A<br>
   <input name="answer" type="checkbox" value="b"/>B<br>
   <input name="answer" type="checkbox" value="c"/>C<br>
   <input name="answer" type="checkbox" value="d"/>D<br>
   <input name="answer" type="checkbox" value="e"/>E<br>
   <input name="answer" type="checkbox" value="f"/>F<br>
</form>
È«Ñ¡¼°ÑéÖ¤javascriptÈçÏ£º
<script type="text/javascript">
function checkAllBox(obj){
 var answer= document.getElementsByName("answer");
 if(obj.checked==true){
  for(var i=0;i<answer.length;i++){
   ans ......

СӦÓ×—jspµ¼³öExcel¼òµ¥±¨±í

½ñÌì¿´µ½Á˹«Ë¾ÒÔÓеÄÏîÄ¿ÀïÃæÓÐÖ±½Óͨ¹ýjsp£¨table£©µ¼³öΪexcel±¨±íµÄÓ¦Ó㬸оõºÜÐÂÆ棬ÒÔÓÐ×öµ¼³öexcel¶¼»áÓÃjava´úÂëд£¬Óõ½×¨ÃŵÄÀà¿â£¬²Ù×÷excelÄ£°å£¬ºÜ¸´ÔÓ£¬ÓÃÕâ¸ö·½·¨£¬¿ÉÄܵõ½µÄ±í¸ñûÓÐÄÇô¾«È·£¬µ«¼òµ¥¸ßЧ£¬Ó¦¸ÃÊÇÒ»¸ö²»´íµÄÓ¦Óá£ÏÂÃæµÄÍøÉϱðµÄͬȥµÄһƪÎÄÕ£¬ÕâÀïÕ³Á˹ýÀ´£¬ºÃ¼Çס£¬ÌØ´ËÉùÃ÷¡£
JSPÓ¦Óõ¼³öExcel±¨±íµÄ¼òµ¥ÊµÏÖÒÔ¼°ÖÐÎÄÂÒÂë³¹µ×½â¾ö£¨HTML)
WebÓ¦Óõ¼³öExcel±¨±íµÄ¼òµ¥ÊµÏÖ£¨HTML£©
ÔÚWebÓ¦ÓÃÖУ¬ºÜ¶àÊý¾Ý¾­³£Òªµ¼³ö³ÉExcelÎĵµ¡£ÓÃרÃŵÄÉú³ÉÕæÕýµÄExcelÎĵµµÄ·½Ê½±È½Ï¸´ÔÓ£¬²»Ì«ºÃÓá£ËùÒÔ¾­³£ÓÃÒ»ÖÖ¼òµ¥µÄ·½Ê½À´ÊµÏÖ£¬¼´½«±¨±í±£´æΪHTML¸ñʽ£¬È»ºóÓÃExcel´ò¿ª¡£
ʵÏÖ·½Ê½£º
µÚÒ»²½,ÓÃJSPʵÏÖHTML°æ±¾µÄ±¨±í
µÚ¶þ²½,ÔÚ¸ÃJSPÒ³ÃæÍ·²¿ÉèÖÃresponseµÄContentTypeΪExcel¸ñʽ
ÒýÓÃ
<% response.setContentType("application/vnd.ms-excel;charset=GBK"); %>
ÖÐÎÄÎÊÌ⣺
²é¿´Ô´´úÂëʱ·¢ÏÖJSPÎļþÖÐдËÀµÄÖÐÎÄΪÂÒÂ룬ÔòÔÚJSPÎļþÍ·²¿Ìí¼ÓÒ»ÐÐ
ÒýÓÃ
<%@ page contentType="text/html; charset=gb2312" %>
²é¿´Ô´´úÂëʱ·¢ÏÖÎÄ×ÖΪÖÐÎÄ£¬µ«ÊÇÓÃExcel´ò¿ªÎªÂÒÂëÔòÔÚ<html>Óë<head>ÖмÓÈë
ÒýÓÃ ......

Jsp /jsÂÒÂëÎÊÌâ


1£®
×î»ù±¾µÄÂÒÂëÎÊÌâ¡£
Õâ¸öÂÒÂëÎÊÌâÊÇ×î¼òµ¥µÄÂÒÂëÎÊÌâ¡£Ò»°ãÐÂÊÖ»á³öÏÖ¡£¾ÍÊÇ
Ò³Ãæ±àÂë²»Ò»Öµ¼ÖµÄÂÒÂë¡£
<%@ page
language="java" pageEncoding="UTF-8"%>
<%@ page
contentType="text/html;charset=iso8859-1"%>
<html>
<head>
<title>ÖÐÎÄÎÊÌâ</title>
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
</head>
</head>
<body>
ÎÒÊǸöºÃÈË
</body>
</html>
Èý¸öµØ·½µÄ±àÂ룺
£¨£±£©
µÚÒ»¸öµØ·½µÄ±àÂë¸ñʽΪjspÎļþµÄ´æ´¢¸ñʽ¡£Eclipse»á¸ù¾ÝÕâ¸ö±àÂë¸ñʽ±£´æÎļþ¡£²¢±àÒëjspÎļþ£¬°üÀ¨ÀïÃæµÄºº×Ö¡£
£¨£²£©µÚ¶þ´¦±àÂëΪ½âÂë¸ñʽ¡£ÒòΪ´æΪUTF-8µÄÎļþ±»½âÂëΪiso8859-1£¬ÕâÑùÈçÓÐÖÐÎĿ϶¨³öÂÒÂë¡£Ò²¾ÍÊÇ
±ØÐëÒ»Ö¡£¶øµÚ¶þ´¦ËùÔÚµÄÕâÒ»ÐУ¬¿ÉÒÔûÓС£È±Ê¡Ò²ÊÇʹÓÃiso8859-1µÄ±àÂë¸ñʽ¡£ËùÒÔÈç¹ûûÓÐÕâÒ»ÐеĻ°£¬“ÎÒÊǸöºÃÈ˔Ҳ»á³öÏÖÂÒÂë¡£±ØÐëÒ»ÖÂ
²Å¿ÉÒÔ¡£
£¨£³£©µÚÈý´¦±àÂëΪ¿ØÖÆä¯ÀÀÆ÷µÄ½âÂ뷽ʽ¡£Èç¹ûÇ°ÃæµÄ½âÂ붼һÖ²¢
ÇÒÎÞÎóµÄ»°£¬Õâ¸ö±àÂë¸ñʽûÓйØϵ¡£ÓеÄÍ ......

Ò»¶Î¿ÉÒÔÔËÐеÄxhtmlµÄjsp´úÂë

<?xml version="1.0" encoding="UTF-8"?>
<%@ page contentType="text/html; charset=UTF-8" language="java" import="java.sql.*" errorPage="" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<base href="<%=basePath%>"/>

<title>ÕâÀïÊÇtitle</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<p>ÕâÊǵÚÒ»¸öXHTMLÒ³Ãæ </p>
</body>
</html> ......
×ܼǼÊý:884; ×ÜÒ³Êý:148; ÿҳ6 Ìõ; Ê×Ò³ ÉÏÒ»Ò³ [5] [6] [7] [8] 9 [10] [11] [12] [13] [14]  ÏÂÒ»Ò³ βҳ
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ