ajax post Ìá½»´óÊý¾ÝÁ¿ - Web ¿ª·¢ / Ajax
RT!
ajax Ìá½»Êý¾Ýʱ£¬Êý¾ÝÁ¿ºÜ´ó ÓÚÊÇ ¾ÍÑ¡ÔñÁË POSTÌá½»¡£
JScript code:
xmlHttpRequest.send(message);
message¾ÍÊÇ ×éÖ¯ºÃµÄÊý¾Ý¡£
ÔÚ100ÌõµÄʱºò£¬java¶Ë¿ÉÒÔ ½ÓÊܵ½Êý¾Ý¡£
200Ìõ¾Í²»ÐÐÁË¡£
Çë´óϺÃÇ °ï°ïСµÜ£¡
ÆäËû´úÂëÄØ£¿
message
ÊÇ´ÓÒ»¸öÒ³ÃæTableÖеõ½µÄÊý¾Ý
¾ÍÏñÊÇ£ºid=001&name=zhangÕâÑùµÄ×Ö·û´®
¸ç¸çÎÒÊ×´ÎÔÚÕâÀï·¢Ìû£¬ËùÒÔ»¨Ê±¼ä¸øÄãддÕâ¸öûӪÑøµÄÎÊÌâ¡£ÄãÕâÎÊÌâ°´µÀÀíÀ´ËµÊDz»´æÔÚ¡£
´úÂ룺
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>·¢ËÍ´ó×Ö·û´®×Ö·û´®</title>
</head>
<body>
<input type="button" value="Send" onclick="send();"/>
</body>
<script type="text/javascript">
var xmlHttp = null;
function createXMLHttpRequest(){
if(window.ActiveXObject){
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}else if(Window.XMLHttpRequest){
xmlHttp = new XMLHttpRequest();
Ïà¹ØÎÊ´ð£º
´úÂëÖУ¬Èç¹û½«//alert(1)¡¡×¢ÊÍ´ò¿ª£¬ÄÇô¾Í¿ÉÒÔµ÷Óã¬Èç¹û×¢Ê͵ô¾ÍÎÞ·¨µ÷ÓÃ
»³ÒÉÊǵ¼JSÎļþ³öÎÊÌâÁË£¬ÒòΪд¹ýjspÒýÁ½¸öJSÎļþûÎÊÌ⣬
¶øJSPÒýÒ»¸öJSÎļþ£¬Õâ¸öJSÒý±ðÍâµÄJSÎļþ³öÏÖÏÂÃæÎÊÌ⣬ÉÏÍøÕÒÁË°ëÌìû½á ......
a.asp
------------------------------------------------<SCRIPT language=javascript src="check.js"></SCRIPT>
<input type="button" value="²âÊÔ" onclick=&quo ......
Ä¿Ç°Ò»¸öÏîÄ¿£¬Óöµ½¸ö´óÎÊÌ⣬Ҫ¸ãÒ»¸öµç×ÓµØͼ£¬Ð¡µÜ´ÓÀ´Ã»¸ã¹ýgis·½ÃæµÄ¶«Î÷£¬Õâ´ÎÓ²×ÅͷƤÉÏÁË¡£ ÏÂÃæÊÇÄ¿Ç°Óöµ½µÄ¸öÎÊÌâ¡£¡£¡£
OpenLayerÔõôÏòºǫ́·¢ËÍajaxÇëÇ󣨺ǫ́ÊÇSSH¿ò¼Ü£©£¬ÔÚÉêÇëµ½ºǫ́µÄactionºó£¬²é ......
Çë½Ì¸ßÈË£¬AjaxÔÀíÏêϸ½²½â ¼°´úÂë˵Ã÷
ÎÒ²Á£¬ÉÏgoogle°¡¡£
http://www.w3school.com.cn/ajax/index.asp
Â¥Ö÷ʲôÒâͼÄØ£¿
³ö ´¦:http://www.javaeye.com/topic/636187
û×ö¹ýwebÇ°¶Ë£¬ËùÒÔÍêȫûÓÐÓà ......
ÎÒÓÃASP.NET AJAXΪºÎ¼¯³É²»ÁË£¬±ÈÈ磨ÎÒÓÃUPDATEPANLE¿Ø¼þÄÚǶһ¸öGRIDVIEW¿ÉÊÇÔÚÉú³É½â¾ö·½°¸Ê±±¨´íÁË£¬ÇëÎÊÄÄλǰ±²ÖªµÀÔõô»ØÊ¡£
°ï¶¥£¬´ÓÀ´Ã»ÓùýUPDATEPANLE
°ï¶¥£¬µÈ´ý»Ø´ð
±¨Ê²Ã´´íàÞ¡£
LZË ......