Myeclipse+Ajax Àý×Ó
Ò»¸öMyEclipseÀïµÄAJAXÀý×Ó2008-03-19 19:53±¾Àý½«ÔÚÒ³ÃæµÄ²ÎÊýÒÔGetºÍPOSTÁ½ÖÖ·½Ê½´«µÝµ½·þÎñÆ÷£¬²¢»ØÏÔµ½Ò³Ã棻 ±¾Àý¹²°üÀ¨Á½¸öÖ÷ÒªÎļþgetAndPostExample.htmlºÍGetAndPostExample.javaÒÔ¼°Ò»¸öÅäÖÃÎļþweb.xml ½¨Á¢ÎļþµÄ²½Ö裺 1.ÔÚEclipseн¨Ò»¸öweb project-->ajax1 2.ÔÚajax1ÀïÃæÐ½¨Ò»¸ögetAndPostExample.html 3.ÔÚajax1ÀïÃæÐ½¨Ò»¸öservlet-->GetAndPostExample.java getAndPostExample.htmlÈçÏÂ
This is the description of my J2EE component This is the display name of my J2EE component GetAndPostExample com.ajax1.GetAndPostExample GetAndPostExample /GetAndPostExample index.jsp ÔÚÕâ¸ö¼òµ¥µÄAJAXµÄÀý×ÓÀïgetAndPostExaple.html¸ºÔð±íµ¥²ÎÊýµÄÊäÈëºÍ´«µÝ£¬¶øservlet GetAndPostExample.java¸ºÔðÔÚ·þÎñÆ÷¶Ë½ÓÊܲÎÊý¡£²ÎÊý´«µÝʱ¼ÓµÄʱ¼ä´ÁÊDZ£Ö¤URLµÄΨһÐÔ¡£
Ïà¹ØÎĵµ£º
Ò»ÖÜǰ£¬leaderÈÃÎÒдһ¸öÀàËÆ°Ù¶ÈµÄ×Ô¶¯Íê³É¹¦ÄÜ£¬ºÇºÇ£¬ÒòΪ¶Ôajax¼¼ÊõÕÆÎյIJ»ºÃ£¬ËùÒÔ¿àÄÕÁ˺ܾÃûÓÐд³öÀ´
¾¹ýÒ»ÖܵÄѧϰ£¬ÖÕÓÚд³öÁËÒ»¸öajax³ÌÐò£¬ÒÔºóµÄ¹¤×÷¾ÍºÃ×ö¶àÀ²
index.jsp
<html>
<head>
<style >
#child{
color: #333;
width:200px;
&nbs ......
×î½üÔÚÓÃAjax×öµÇ¼´°¿Ú£¬µ«ÊÇlogoutµÄʱºòÐèÒª¶Ôsession½øÐд¦Àí¡£ÓõÄÊÇsession.removeAttribute()º¯Êý½øÐÐlogout¡£µ«ÊÇ£¬ÊÂʵ֤Ã÷£¬ÔÚlogoutÒÔºó£¬ÔٴεǼµÄʱºò£¬²¢²»Äܵǽ³É¹¦£¬Ñ¹¸ù²»»á½øÈëactionÖ´ÐÐÏàÓ¦µÄ·½·¨£¨hqlÓï¾äҲûÓÐÖ´ÐУ©¡£
Ϊ´Ë£¬¾Ý˵ÓÐÁ½ÖÖ·½·¨½ ......
MOOTOOLSÖеķ½·¨Ê¹ÓÃ
Core.js
º¯Êý: $extend ½«µÚ¶þ¸ö²ÎÊý¶ÔÏóµÄËùÓÐÊôÐÔ¸´ÖƵ½µÚÒ»¸ö²ÎÊý¶ÔÏóÖÐ.
º¯Êý: $merge ºÏ²¢Ò»×é¶ÔÏóÉú³ÉжÔÏó
º¯Êý: $each µü´úÊý×é(°üÀ¨·Ç³£¹æÊý×é,ÈçÓÉÄÚ½¨µÄgetElementsByTagName·½·¨·µ»ØµÄ¼¯ºÏ¶ÔÏó, arguments¶ÔÏó, »òOjbect¶ÔÏó)
º¯Êý: $pick ·µ»Ø² ......
½ñÌì³Á˶ÎÊéÉÏС´úÂ룬´úÂëÈçÏÂ
<html>
<head>
<script type="text/javascript" src="zxml.src.js"></script>
<script type="text/javascript">
function start() {
var oXmlHttp = zXmlHttp.createRequest();
oXmlHttp.open("get", "info11.txt", true);
oXmlHttp.onreadystatecha ......
ashxÎļþÊÇ.net 2.0мӵÄÎļþÀàÐÍ(ÆäʵÔÚ.net 1.0ÏÂÒѾ¿ÉÓÃ,µ«ÊÇûÓй«¿ªÌṩ).
ashxÎļþºÍaspxÎļþÓÐʲô²»Í¬? ÎÒÃÇÏÈн¨Ò»¸öashxÎļþ¿´¿´:
ashx
<%@ WebHandler Language="C#" Class="Handler" %>
using System;
using System.Web;
public class Handler : IHttpHandler {
public void Process ......