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

jspÖÐʹÓÃEXCEL×é¼þ½«±í¸ñµ¼³öΪEXCELÎļþ

´ËÖÖ·½·¨Ê¹ÓÃexcelµÄ×é¼þ£¬ÒªÇó¿Í»§¶Ë±ØÐë×°ÓÐexcel³ÌÐò¡£·½·¨Êǽ«±í¸ñÖеÄÿ¸ötd±êÇ©µÄÄÚÈÝÈ¡³ö£¬×÷ΪexcelÎļþÖÐÒ»¸öµ¥Ôª¸ñµÄÄÚÈÝ¡£
1¡¢ÔÚÍøÒ³ÖÐÌí¼Ójava½Å±¾
function AutomateExcel(tableid,unusecolumn)
{
 // »ñÈ¡excel×é¼þ
 var oXL = new ActiveXObject("Excel.Application");
 
 //´´½¨¹¤×÷±¡
 
 var oWB = oXL.Workbooks.Add();
 
 var oSheet = oWB.ActiveSheet;
 
 var table = document.getElementById(tableid);
 
 var hang = table.rows.length;
 
 var lie = table.rows(0).cells.length;
 
 for (i=0;i<hang;i++)
 
 {
 
  for (j=0;j<lie-unusecolumn;j++)
  
  {
  
   oSheet.Cells(i+1,j+1).value = table.rows(i).cells(j).innerText;
  
  }
  
 }
  
  oXL.Visible = true;
  
  oXL.UserControl = true;  
}
2¡¢Ôö¼Óµ¼³ö°´Å¥
<input class="Noprint" type="Button" onclick="AutomateExcel('ordertable','0');" value="µ¼³ö">
AutomateExcelº¯ÊýµÄµÚÒ»¸ö²ÎÊýÊÇÒªµ¼³öµÄ±í¸ñµÄID£¬µÚ¶þ¸ö²ÎÊý±íʾµ¼³öʱ±í¸ñĩβҪºöÂÔµÄÁÐÊý£¬Èç²»ÐèÒªºöÂÔ£¬ÇëÉèÖÃΪ‘0’
3¡¢OK£¡


Ïà¹ØÎĵµ£º

JSP ±Ê¼Ç


JSP£¨Java Server Page£©
JSPÊÇ·þÎñÆ÷¶ËÔËÐеÄÒ³Ã棬JSP±¾¾ÍÊÇÒ»¸öÎĵµ£¬Ëû²»½ö¿ÉÒÔ°üº¬¾²Ì¬µÄHTML´úÂ룬Ҳ¿ÉÒÔ°üº¬¶¯Ì¬µÄJAVA´úÂ룬·þÎñÆ÷ÈÝÆ÷¿ÉÒÔ½«JSPת»»³ÉServlet·¢²¼£¬²¢½ÓÊÜÇëÇó¡£
JspÎļþÖ»Ðè·ÅÔÚÓ¦ÓÃÎļþϾͿÉÒÔÁË¡£
JSPÀý×Ó£º
<html>
<head><title>time</title></head>
& ......

servlet¡¢jspÖлñµÃÏîÄ¿¾ø¶Ô·¾¶

servletÖлñµÃÏîÄ¿¾ø¶Ô·¾¶
String filePath=this.getServletConfig().getServletContext().getRealPath("/");
¸ùĿ¼Ëù¶ÔÓ¦µÄ¾ø¶Ô·¾¶:request.getServletPath();
ÎļþµÄ¾ø¶Ô·¾¶ :request.getSession().getServletContext().getRealPath(request.getRequestURI())
µ±Ç°webÓ¦Óõľø¶Ô·¾¶ :servletConfig.getServletCo ......

Jsp±à³Ì

 JAVA×ÛºÏÃæÊÔÌ⣺ҳÃæµÄץȡ¡¢½âÎö¡¢±£´æÊý¾Ý¿âºÍÉú³ÉHTMLµÄÒ³Ãæչʾ ÊÕ²Ø
´ÎÀý×Ó¿ÉÒÔÓÃÀ´Ñ§Ï°ÍøÂç±à³Ì£¬ÕýÔò±í´ïʽµÄʹÓ㬷ºÐÍ£¬Êý¾Ý¿âµÄ»ù±¾²Ù×÷µÈJAVA֪ʶ
ÎÊÌâÈçÏ£ºÀ´Ô´ÓÚÂÛ̳
http://topic.csdn.net/u/20090616/13/59aa4e2d-3752-45df-9c1b-c65c46c3e4d7.html
дһ¸öjspÒ³Ã棬·ÃÎÊʱÏÔʾ´ÓÏÂÃæµÄÒ³ÃæÌ ......

java web¿ª·¢ÖУ¬ÈçºÎ²é¿´JSPºÍServlet°æ±¾

java web¿ª·¢ÖУ¬ÈçºÎ²é¿´JSPºÍServlet°æ±¾
2008-12-10 09:00
ÎÒÃÇÔÚjava web¿ª·¢µÄ¹ý³ÌÖУ¬ÓÐʱÔÚ×ÊÁÏÉÏ¿ÉÄÜ»áÌáµ½»·¾³ËùÒªÖ§³ÖµÄJSP£¬Servlet°æ±¾¡£Èç¹û°æ±¾µÍ¾Í¿ÉÄܳöÏÖ²âÊÔ´íÎó¡£
·½·¨£º´ò¿ªtomcatµÄcommon\lib Ŀ¼Ï£¬ÓÐÁ½¸öJARÎļþ£º jsp-api.jar servlet-api.jar ¡£Èç¹ûûÓУ¬ÄÇ¿ÉÄÜÊÇÄãûÓÐÌí¼Ó½øÀ´¡£½âѹÕâÁ½¸ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ