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

Live search using BSP (BSPÖÐAJAXʵÏÖ)

    ³õѧBSP, Ò»Ö±ÔÚÏëÈçºÎʵÏÖAJAXЧ¹û, Æðµ½ÎÞÒâ¿´µ½ÕâÆªÍøÎÄ, ²ÅÓÐÒ»ÖÖ»óÈ»¿ªÀʵĸоõ, ¿÷ÎÒ»¹¹ýASP/ASP.net , ÕæÊÇ×öÁ˼¸ÄêABAP×öɵÁË,ºÇºÇ
    ÆäʵBSPºÍASPºÜÏó, ¿ÉÒÔ²ÉÓÃASPµÄ·½·¨À´ÊµÏÖAJAXÓ¦ÓÃ, ÎÞ·ÇÊǵ÷ÓÃxmlHttpRequest¶ÔÏó¶ø¼º.
    Ô­ÎĵØÖ·: http://scnblogs.techweb.com.cn/leonard/archives/38.html, תÌùÈçÏÂ:
  
   
    ÄãÒ»¶¨¾­³£Ê¹ÓÃgoogle»ò°Ù¶È¡£µ±ÄãÊäÈëÒª²éѯµÄ´ÊÌõµÄʱºò£¬ÔÚÊäÈë¿òµÄϱ߻á×Ô¶¯Ìáʾ¿ÉÄܵÄÑ¡Ïî£¬Ëæ×ÅÄãÊäÈëÖµµÄ±ä»¯¶ø±ä»¯¡£Õâ¾ÍÊÇËùν”Search-as-you-type”¡£
Google “Search-as-you-type” ÓÐһЩÑÝʾcode¿ÉÏÂÔØ£¬ÒªÔËÐеϰÔÙÏÂÔØÒ»¸ö³¬ÇáÁ¿¼¶µÄHttp·þÎñÆ÷xampp¡£
http://code.google.com/p/search-as-you-type/
ÉÏÃæµÄcodeÊÇÓÃPHPдµÄ£¬ÒªÖªµÀËüµÄÔ­Àí£¬¿ÉÒԲο¼ÏÂÃæÕâÆªÎÄÕ£º
PHP Ajax live search
http://www.w3schools.com/php/php_ajax_livesearch.asp
ÄÇôÕâÖÖ¼¼ÊõÓÃSAPµÄ¼¼ÊõÊÇ·ñ¿ÉÒÔʵÏÖÄØ£¿»Ø´ðÊǿ϶¨µÄ¡£Óüòµ¥µÄBSP+Javascript±à³Ì¾Í¿ÉÒÔʵÏÖ¡£
Ê×ÏÈ´´½¨Ò»¸öBSP Application: zlive_search 
ÔÙ´´½¨Á½¸öPages with Flow Logic:
1. search.htm
2. livesearch.htm
Search.htm   -  search page with an input text box
 <%@page language=”abap”%>
<%@extension name=”htmlb” prefix=”htmlb”%>
<html>
<head>
<script type=”text/javascript”>
var xmlhttp;
function showResult(str)
{
if (str.length==0)
  {
  document.getElementById(”livesearch”).innerHTML=””;
  document.getElementById(”livesearch”).style.border=”0px”;
  return;
  }
xmlhttp=GetXmlHttpObject()
if (xmlhttp==null)
  {
  alert (”Your browser does not support XML HTTP Request”);
  return;
  }
var url=”livesearch.htm”;
url=url+”?q=”+str;
url=url+”


Ïà¹ØÎĵµ£º

jquery ajaxµÄ $.get()ºÍ$.post()·½·¨


$.get()ºÍ$.post()·½·¨
    $.get(url [,data] [,callback] [,type])
    type£ºstringÀàÐÍ£¬·þÎñÆ÷¶Ë·µ»ØÄÚÈݵĸñʽ£¬°üÀ¨xml£¬html£¬script£¬json£¬textºÍ_default
    »Øµ÷º¯ÊýÖ»ÓÐÁ½¸ö²ÎÊý£ºfunction(data,textstatus){....}
    data:·µ»ØµÄÄÚÈÝ £ ......

ÎҵĵÚÒ»¸öajax ×Ô¶¯Íê³É

Ò»ÖÜǰ£¬leaderÈÃÎÒдһ¸öÀàËÆ°Ù¶ÈµÄ×Ô¶¯Íê³É¹¦ÄÜ£¬ºÇºÇ£¬ÒòΪ¶Ôajax¼¼ÊõÕÆÎյIJ»ºÃ£¬ËùÒÔ¿àÄÕÁ˺ܾÃûÓÐд³öÀ´
¾­¹ýÒ»ÖܵÄѧϰ£¬ÖÕÓÚд³öÁËÒ»¸öajax³ÌÐò£¬ÒÔºóµÄ¹¤×÷¾ÍºÃ×ö¶àÀ²
index.jsp
<html>
<head>
<style >
 #child{
  color: #333;
  width:200px;
 &nbs ......

ʹÓÃJavaScriptºÍAjax·¢³öÒì²½ÇëÇóÏê½â

´ò¿ªÇëÇó
¡¡¡¡ÓÐÁËÒªÁ¬½ÓµÄ URL ºó¾Í¿ÉÒÔÅäÖÃÇëÇóÁË¡£¿ÉÒÔÓà XMLHttpRequest ¶ÔÏóµÄ open() ·½·¨À´Íê³É¡£¸Ã·½·¨ÓÐÎå¸ö²ÎÊý:
request-type:·¢ËÍÇëÇóµÄÀàÐÍ¡£µäÐ͵ÄÖµÊÇ GET »ò POST£¬µ«Ò²¿ÉÒÔ·¢ËÍ HEAD ÇëÇó¡£
url:ÒªÁ¬½ÓµÄ URL¡£
asynch:Èç¹ûÏ£ÍûʹÓÃÒì²½Á¬½ÓÔòΪ true£¬·ñÔòΪ false¡£¸Ã²ÎÊýÊÇ¿ÉÑ¡µÄ£¬Ä¬ÈÏΪ true¡£
......

asp.netÖÐÈÝÒ×»ìÏýµÄajax¸ÅÄî


AJAXÊÇAsynchronous JavaScript and XMLËõд¡£Õâ¸ö¸ÅÄî´ú±íµÄÊÇÒ»ÖÖ¼¼Êõ£¬µ±ÄúÔÚ˵“ÎÒÔÚÏîÄ¿ÖÐʹÓÃÁËAJAX¼¼Êõʱ”£¬Ö»ÊÇ´ú±íÁËÄúʹÓÿͻ§¶ËXMLHttpRequest¶ÔÏóÓë·þÎñÆ÷¶Ë½øÐÐÒ첽ͨÐÅ¡£²»¹ýÒòÎªËæ×ÅAJAX¼¼ÊõµÄÔËÓÃÍùÍù»á´øÀ´·á¸»µÄ¿Í»§¶ËЧ¹û£¬Òò´Ë¶ÔAJAX¼¼ÊõµÄ¹ãÒåÀí½âÒ²¿ÉÒÔÈÏΪÕâÊÇÒ»ÖÖ²Ù×÷ ......

ajax¼¼ÊõÏê½â

  AJAX¼¼ÊõÓ¦ÓÃÏê½â ÊÕ²Ø
AJAXÊÇAsynchronous JavaScript and XML µÄËõд¡£Ëü²¢²»ÊÇÒ»ÃÅеÄÓïÑÔ»ò¼¼Êõ£¬Ëüʵ¼ÊÉÏÊǼ¸Ïî¼¼Êõ°´Ò»¶¨µÄ·½Ê½×éºÏÔÚÒ»ÔÚͬ¹²µÄЭ×÷Öз¢»Ó¸÷×ÔµÄ×÷Óã¬Ëü°üÀ¨:ʹÓÃXHTMLºÍCSS±ê×¼»¯³ÊÏÖ;ʹÓÃDOMʵÏÖ¶¯Ì¬ÏÔʾºÍ½»»¥;ʹÓÃXMLºÍXSLT½øÐÐÊý¾Ý½»»»Óë´¦Àí;ʹÓÃXMLHttpRequest½øÐÐÒì²½Êý¾Ý¶ÁÈ¡;×î ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ