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

JAVA AJAX½Ì³ÌµÚËÄÕ—AJAXºÍMVCµÄ¼òµ¥½áºÏ

 ÕâÀïÎÒÃÇÔÙÀí½âÁËAJAXºó£¬¿ªÊ¼À´ÓÃʵÀý¸ÐÊÜAJAXµÄÁ¦Á¿¡£
½ñÌìÎÒ×îºóҪʵÏÖµÄЧ¹û£¬µ±Êó±ê·Åµ½Í¼Æ¬ÉÏʱ»á¸ù¾Ý£¬»á°ÑÊý¾Ý¿â¿âÀïµÄÊý¾Ý¶Á³ö£¬Í¨¹ýÏÔʾ¿òÏÔʾ³öÀ´¡£Õâ¸öÔںܶàÍøÉÏÉ̵궼ÓÐÓõ½ÕâÀïЧ¹û£¬ÎÒÃÇÕâÀïÓÃAJAXÀ´ÊµÏÖÕâ¸öЧ¹û¡£Õâ¸öʵÀýÀï½áºÏÁËMySql¡¢Servlet»¹ÓÐJs£¬ÀíÂÛÐÔºÜÉÙ£¬µ«Í¨¹ýʵ¼ùÀ´¸ÐÊÜÀíÂÛ֪ʶ¡£
Ò»¸öÒ³ÃæÖÐÓ¦ÓÃÁËAJAX£¬Í¬Ê±ËûÒ²ÄÜʵÏÖMVC¿ò¼Ü£¬¿ÉÒÔÂ𣿵±È»¿ÉÒԵġ£Í¨¹ýÒ³Ãæµ÷ÓÃAJAX£¬Õâ¸öÒ³Ãæ¾ÍÊÇMVCÖеÄV£¬ËûÓÃÀ´Ç°Ì¨ÏÔʾÓëÓû§½»»¥µÄÄÚÈÝ¡£ÓÃJavaBean×÷ΪMVCÖеÄM£¬À´·âװһЩÎÒÃÇÐèÒªµÄ¹¦ÄܺÍÊý¾Ý£¬ÕâÑù±ãÓÚC½«ÐÅÏ¢´«¸øV¡£ÕâÀï¾ÍÇ£Éæµ½C£¬Ê²Ã´ÊÇCÄØ£¬ÕâÀïÎÒÃÇÔÚModel2ÖеÄC¾ÍÊÇServlet£¬ËûÓÃÀ´¶Ô¾ßÌåµÄÊÂÇé½øÐпØÖÆ¡£M-V-C¶¼ÆëÈ«ÁË£¬ÕâÑùÎÒÃǾÍÍê³ÉÒ»¸öMVCÁË¡£ÔÚÏÂÃæµÄÎļþ½á¹¹ÖУ¬ÈÃÎÒ¸øÄãÖ¸³öÄÄЩÊÇM-V-C¡£main.htmlºÍlogin.jspÊÇV£¬DB.javaºÍProduct.javaÊÇJavaBeanÒ²¾ÍÊÇM£¬¶øLoginAction.javaºÍTipServlet.javaÊÇC£¬ÏÂÃæ¾ÍÀ´¿´¿´ÈçºÎ°ÑAJAXºÍMVC½áºÏÆðÀ´¡£
ÕâÀïÊÇÎÒÃǵÄÎļþ½á¹¹£¬ÎÒÃÇÐèÒªÒ»¸öÒ³Ãæmain.htmlÀ´³ÐÔØǰ̨£»Ò»¸öÊý¾Ý¿âÊý¾ÝÀ´´æ´¢ÎÒÃǵÄÉ豸£»ÓÉÓÚÕâÀﻹÊÇ»ùÓÚMVC¿ò¼ÜÀ´×öµÄ£¬ËùÒÔ³ýÁËÒ³ÃæÍ⣬ÎÒÃÇ»¹ÐèÒªServletÀ´ÊµÏÖ¾ßÌåµÄ¹¦ÄÜ£¬DB.java¡¢Product.javaºÍTipServlet.javaÀà¡£ÏêϸµÄ×¢ÊÍдÔÚ´úÂ룬ÕâÑù·½±ãÀí½âºÍ²é¿´¡£
ÎÒÃÇÏÈÀ´¿´main.html´úÂë(ÏêϸעÊÍдÔÚ´úÂë)£º
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript">
//¶¨ÒåÏÔʾ¿ò
var datadiv;
var datatablebody;
//µ±Ç°DOM½Úµã
var curelement;
var XMLHttpReq = false;
//´´½¨XMLHttpRequest¶ÔÏó
function createXMLHttpRequest(){
if(window.XMLHttpRequest){
XMLHttpReq = new XMLHttpRequest();
}else if(window.ActiveXObject){
try{
XMLHttpReq = new ActiveXObject("MSXML2.XMLHTTP");
}catch(e){
try{
XMLHttpReq = new ActiveXObject("Mircsoft.XMLHTTP");
}catch(e1){}
}
}
}
//·¢ËÍÇëÇóº¯Êý
function getdatail(element){
datatablebody = document.getElementById("databody");
datadiv = document.getElementById("popup");
createXMLHttpRequest();
curelement = element;
var url


Ïà¹ØÎĵµ£º

sql 2005 ´æ´¢¹ý³Ì·ÖÒ³ java ´úÂë

 create PROCEDURE pagelist
@tablename nvarchar(50),
@fieldname nvarchar(50)='*',         
@pagesize int output,--ÿҳÏÔʾ¼Ç¼ÌõÊý
@currentpage int output,--µÚ¼¸Ò³
@orderid nvarchar(50),--Ö÷¼üÅÅÐò
@sort int,--ÅÅÐò·½Ê½£¬1±íʾÉýÐò£¬0±íʾ½µÐòÅÅÁÐ ......

java¼¯ºÏÀà

 ArrayList ºÍVectorÊDzÉÓÃÊý×鷽ʽ´æ´¢Êý¾Ý£¬´ËÊý×éÔªËØÊý´óÓÚʵ¼Ê´æ´¢µÄÊý¾ÝÒÔ±ãÔö¼ÓºÍ²åÈëÔªËØ£¬¶¼ÔÊÐíÖ±½ÓÐòºÅË÷ÒýÔªËØ£¬µ«ÊDzåÈëÊý¾ÝÒªÉè¼Æµ½Êý×éÔªËØÒƶ¯µÈÄÚ´æ²Ù×÷£¬ËùÒÔË÷ÒýÊý¾Ý¿ì²åÈëÊý¾ÝÂý£¬VectorÓÉÓÚʹÓÃÁËsynchronized·½·¨£¨Ḭ̈߳²È«£©ËùÒÔÐÔÄÜÉϱÈArrayListÒª²î£¬LinkedListʹÓÃË«ÏòÁ´±íʵÏÖ´æ´¢£¬°´Ðòº ......

Java ÖØÔØÓëÖØд

 ÔÚJAVAÖУº
  1. º¯ÊýÖØÔØÊÇÒ»¸öÀàÖÐÉùÃ÷Á˶à¸öͬÃûµÄ·½·¨£¬µ«Óв»Í¬µÄ²ÎÊý¸öÊýºÍ²ÎÊýÀàÐÍ¡£
  2. º¯ÊýÖع¹ÊÇÖ¸ÔÚ×ÓÀàÖÐÉùÃ÷Ó븸ÀàͬÃûµÄ·½·¨£¬´Ó¶ø¸²¸ÇÁ˸¸ÀàµÄ·½·¨¡£Öع¹½â¾öÁË×ÓÀàÓ븸ÀàµÄ²îÒìÎÊÌâ¡£
Àý×ÓÈçÏ£º
//ÖØÔØ
class A {
public d (){};
public d (q){};
public d (q,w){};
}
//ÖØд ......

java½âÎöxmlÎļþËÄÖÖ·½Ê½

 from: http://blog.csdn.net/WOSHISUNXIANGFU/archive/2008/08/25/2828634.aspx
 1.½éÉÜ
1£©DOM£¨JAXP Crimson½âÎöÆ÷£©
DOMÊÇÓÃÓëƽ̨ºÍÓïÑÔÎ޹صķ½Ê½±íʾXMLÎĵµµÄ¹Ù·½W3C±ê×¼¡£DOMÊÇÒÔ²ã´Î½á¹¹×éÖ¯µÄ½Úµã»òÐÅϢƬ¶ÏµÄ¼¯ºÏ¡£Õâ¸ö²ã´Î½á¹¹ÔÊÐí¿ª·¢ÈËÔ±ÔÚÊ÷ÖÐÑ°ÕÒÌض¨ÐÅÏ¢¡£·ÖÎö¸Ã½á¹¹Í¨³£ÐèÒª¼ÓÔØÕû¸öÎĵµ ......

JavaÖеÄequals()ºÍhashCode()·½·¨

    ÔÚJavaÓïÑÔÖУ¬Ò»°ã²»ÐèÒª×Ô¶¨Òåequals()ºÍhashCode()ÕâÁ½¸ö·½·¨£¬µ±ÐèÒª¶Ô¶ÔÏóµÄÄÚÈݽøÐбȽϵÄʱºò£¬²ÅÐèÒªÕâÑùÁ½¸ö·½·¨¡£ÀýÈ磬ÐèÒª°Ñ¶ÔÏó·ÅÈëHashSet»òÕ߰ѶÔÏó×÷Ϊkey·ÅÈëHashMap¡¢ Hashtableʱ£¬Èç¹û²»Ïë°Ñ¾ßÓÐÏàͬÄÚÈݵÄÁ½¸ö¶ÔÏó×÷ΪÁ½¸ö¶ÔÏóÀ´¿´´ý£¬¾ÍÐèÒªÖض¨ÒåÕâÁ½¸ö·½·¨¡£ÕâÁ½¸ö·½·¨µÄʹÓÃÊÇ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ