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

ajax´«Öµ¸øCGI,µ«CGIµÃ²»µ½Êý¾Ý

ÔÚfunction lb(i)ÖмÓÈëalert(x_url)Äܵõ½ÕýÈ·µÄÖµ"bbs_get_grouplist?gn=1&lb=1"
µ«ajax´«»ØÀ´µÄֵʼÖÕÊÇ"aaaaaaaaaaa",²»ÖªµÀÊÇʲôԭÒò¡£

main(){
printf("%s","Content-type:text/html;charset=UTF-8;\n\n");
if(getenv("CONTENT-LENGTH")){
int n=atoi(getenv("CONTENT_LENGTH"));
printf("%d",n);
}
else{
printf("%s","aaaaaaaaaaa");
}
}


function lb(i){
var x_lb=document.getElementById("bbs_group1").value;
var x_url="bbs_get_grouplist?gn="+i+"&lb="+x_lb;
if(!req)requestCreate();
if(req){
req.open("GET" , x_url , true);
req.onreadystatechange=function(){if(req.readyState==4 && req.status==200)alert(req.responseText);}
req.send(null);
}
}
POSTʱºòÔÙ¼ì²éCONTENT_LENGTH

GET·½·¨Ö±½Ó¶ÁÈ¡
QUERY_STRING¼´¿É

¸øÄãÒ»¸öcдµÄcgi demo,¹ØÓÚ»·¾³±äÁ¿µÄ,Ó¦¸Ã¶ÔÒ»ÓÐÓÃ.
C/C++ code:

// cgi-demo.c: Simple CGI demo program.
// Vers. 2.00 - 04.April 2007
// k.d.walter@t-online.de

// Includes

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main (int argc, char *argv[])
{
char *pEnvPtr;

printf ("


Ïà¹ØÎÊ´ð£º

ÎªÊ²Ã´Ò³ÃæÒ»¼ÓÉÏAjax¾Í³ö´í

²é¿´Ô´Îļþʱ³öÀ´µÄ
<script type="text/javascript">
// <![CDATA[
Sys.Application.initialize();
Sys.Application.add_init(function() {
    $create(Sys.UI._Upd ......

¹úÇì»ùÓÚAjaxµÄ¸öÈ˲©¿ÍÍøÕ¾ÉÏÏߣ¬É¢·Ö100

¾­¹ýÒ»¸öÐÇÆÚµÄ²»¶ÏŬÁ¦£¬ÎҵĻùÓÚAjax+SSH(Óеãµãɱ¼¦ÓÃÅ£µ¶£¬ºÇºÇ)µÄ¸öÈ˲©¿ÍÖÕÓÚ¿ÉÒÔÕýʽÉÏÏßÁË¡£
ÏÖÔÚÉ¢·Ö½ÓÊܸ÷λ´óÏÀµÄ±ÉÊÓ¡£
ÍøÖ· www.bleehome.cn  BLEE HOME

(±¾À´Ïë¶àÉ¢µã£¬µ«ËµÎÒÖ»ÄÜÉ ......

ʹÓÃÁËAjax£¬ÎªÊ²Ã´Ò³Ã滹»á±»È«²¿Ë¢ÐÂ

Ö÷Ò³ÃæDefaultÉè¼Æ´úÂëÈçÏ£º
<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<%@ Regis ......

Çó½Ì£ºajax´¦Àí»ØÀ´ºóÒ³ÃæÑùʽ±í¶ªÊ§Ê±Ê²Ã´Ô­Òò

Ò³ÃæÍ·²¿ÒýµÃÑùʽ±í
<link style="../css/01_box_fixed.css">
<script src='../dwr/interface/user_login.js'> </script>
<script src='../dwr/engine. ......

´ó¼Ò¿´¿´ÎҵĴúÂëÓÐʲôÎÊÌ⣨¹ØÓÚajaxµÄ£©

ÔÚ¼ÒÑо¿ajax£¬¿´Á˱ðÈ˵ÄÒ»¸öÍøÉϹºÎïÉ̳ÇÏîÄ¿µÄÔ´´úÂ룬×Ô¼ºÒ²À´·Â±ðÈ˵Ķ«Î÷Á·Ï°Á·Ï°£¬Ã»Ïë³öÎÊÌâÁË£¡Ò»ÏµÄÕâЩ´úÂëÊÇÎÒ·ÂÕÕ±ðÈËдµÄ¡£ÎÒÊÇÏëÈÃ×¢²áµÄÈËÌîдÓû§Ãû£¬¹â±êÀ뿪Óû§ÃûºóÃæµÄÌîд¿Õ°×´¦ºóÁ¢¿ÌÀûÓÃaj ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ