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

ÔÚJSPÖÐÓÃObject¶ÔÏóÀ´´«µÝÖµ

JavaScript´úÂ룺
          //°ìÊ´¦³éÈ¡±ÈÀý¸Ä±ä£¬¸üÐÂÆäËûÊý¾Ý
....function changeOfficeSampleScale(obj,flushOfficeRow){
 var row=obj.parentNode.parentNode;  //È¡µÃËùÔÚÐÐ
 var officeCode=row.id; //È¡µÃÐеÄId
 
 if(isNaN(obj.value)){//Èç¹û²»ÊÇÊý×Ö£¬ÔòÌáʾ
   alert("ÄúÊäÈ벻ΪÊý×Ö£¬ÇëÊäÈëÊý×Ö!");
   obj.value=0;
   var p=0;
   //return; 
  }else{
   if(obj.value<0){
    alert("ÇëÊäÈë·Ç¸ºÊý£¡");
    obj.value=0;
   var p=0;
   }else{
    var p=Math.ceil(obj.value); //תΪÊýÖµ
   }
  }
  
 
 if(p>=100){
  p=100; 
  obj.value=p;  
 }
 
 var crows=document.getElementsByName("sub_"+officeCode);
 for(var i=0;i<crows.length;i++){
  var crow=crows[i];  
  if(crow.cells.item(4).innerText==0){
   continue;
  }
  var txtControl=crow.cells.item(2).children.item(0);
  txtControl.value=p;
  changeSampleScale(txtControl);  
 } 
 initOfficeRow(row);
 if(flushOfficeRow){
  contAllTotal();
 }
}
JSP´úÂ룺
<table id="dispTable">
         <tr class="bg">
        <td>°ìÊ´¦</td>
        <td>·þÎñÕ¾</td>
        <td id="smpScale">³éÈ¡±ÈÀý</td>
        <td id="smpNum">³éÈ¡ÊýÁ¿</td>
        <td>ÈÎÎñ×ÜÁ¿</td> 
     &


Ïà¹ØÎĵµ£º

´¿JSP·ÖÒ³´úÂëÖ®Mysql

//ÔËÐÐͼ:
//Á¬½Ó×Ö·û´®
String url="jdbc:mysql://localhost/"+dbName+"?user="+userName+"&password="+userPasswd;
Class.forName(driverName).newInstance();
Connection connection=DriverManager.getConnection(url);
Statement statement = connection.createStatement();
//ÿҳÏÔʾ¼Ç¼Êý
int PageSize ......

JspµÄ¾ÅÖÖ¶ÔÏó

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 ......

servletºÍJSPÓб¾ÖÊÉϵÄÇø±ðô

ÏÈsunÌá³öµÄÊÇServletÌåϵ£¬Õâ¸öÌåϵʹµÃʹÓÃJAVAµÄ³ÌÐòÔ±Ò²ÄÜ¿ª·¢»ùÓÚB/S¼Ü¹¹µÄWEBÓ¦ÓóÌÐò£¬Ê¹ÓÃServletÀཫHTTPÇëÇóºÍÏìÓ¦·â×°ÔÚ±ê×¼JAVAÀàÖÐÀ´ÊµÏÖ¸÷ÖÖWEBÓ¦Ó÷½°¸¡£
Ëæ×Å´óÁ¿µÄB/S¼Ü¹¹³ÌÐò¿ª·¢³öÀ´ÒÔºó£¬ÈËÃÇ·¢ÏÖServletÀàµÄ±àдÊǷdz£·±ËöµÄ£¬Ö÷Òª¼¯ÖÐÔÚ¼¸¸öÎÊÌâÉÏ£ºÊ×ÏÈÓдóÁ¿ÈßÓà´úÂ룬ÕâЩ´úÂëÔÚÿ¸öservletÀàÖж ......

JSPÖлùÓÚSessionµÄÔÚÏßÓû§Í³¼Æ·ÖÎö

JSP×÷ΪºóÆðÖ®ÐãÄܹ»ÔÚ·þÎñÆ÷±à³Ì»·¾³ÖÐÕ¼¾ÝÒ»¶¨µØ룬ÊǺÍËüÁ¼ºÃÖ§³ÖһϵÁÐÒµ½ç±ê×¼ÃÜÇÐÏà¹ØµÄ¡£Session¾ÍÊÇËüÌṩµÄ»ù´¡ÉèÊ©Ö®Ò»¡£×÷Ϊһ¸ö³ÌÐòÔ±£¬Äã¿ÉÒÔ²»½éÒâ¾ßÌåÔÚ¿Í»§¶ËÊÇÈçºÎʵÏÖ£¬¾Í·½±ãµÄʵÏÖ¼òµ¥µÄ»ùÓÚsessionµÄÓû§¹ÜÀí¡£ÏÖÔÚ¶ÔÓÚ´¦ÀíÔÚÏßÓû§£¬Óм¸ÖÖ²»Í¬µÄ´¦Àí·½·¨¡£
¡¡¡¡Ò»ÖÖÊÇÒ³ÃæË¢ÐÂÓÉÓû§¿ØÖÆ£¬·þÎñÆ÷ ......

JSPÖеÄinclude »úÖÆ

±¾ÎÄÊÇÐ嵀 JSP ×î¼Ñʵ¼ùϵÁÐÎÄÕµĵÚÒ»²¿·Ö£¬Ëü½éÉÜÁË JavaServer Pages include »úÖÆ¡£Çë¸úËæ Java ±à³Ìר¼Ò Brett McLaughlin ѧϰÈçºÎʹÓà include ½«¾²Ì¬µÄÍ·ÎļþºÍ½Å×¢Îļþ¼ÓÈëÄúµÄÍøÕ¾»ò Web Ó¦ÓóÌÐòÒ³ÃæÖС£
»¶Ó­ÔĶÁ Java רÇøÖÐ×îеÄ×î¼Ñʵ¼ùϵÁÐÎÄÕ¡£Èç¹ûÄú¿´¹ýÏÈÇ°µÄϵÁÐÎÄÕ£¬ÄÇôÄú»áÖªµÀ×î¼Ñʵ¼ùÖ¼ÔÚÈà ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ