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+”
Ïà¹ØÎĵµ£º
×òÌì¿´ÁËÆª²»ÊǺÜÑϽ÷µÄ²©ÎÄ¡¶Ò»¸öËãÃüС͵³ÌÐòµÄµ®Éú¡·£¬ÀïÃæÐ´ÁËÒ»¸öͨ¹ýAJAX͵ÇÔ±ðÈËÍøÕ¾Ëã·¨µÄ·½·¨¡£Êµ¼ùÁËһϸù±¾²»ÐУ¬AJAXËÆºõ²»ÄÜ¿çÓò¡£
ºóÀ´ÎÒÏëÁËһЩ½â¾ö·½·¨£¬ÖÕÓÚ¿çÓò³É¹¦¡£ÏÖÔÚ¹«²¼Ò»Ï·½·¨¡£
ÈÎÎñ£ºÔÚ×Ô¼ºÍøÕ¾×ö¸ö±íµ¥£¬Ïò¡ ......
×î½üÔÚÓÃAjax×öµÇ¼´°¿Ú£¬µ«ÊÇlogoutµÄʱºòÐèÒª¶Ôsession½øÐд¦Àí¡£ÓõÄÊÇsession.removeAttribute()º¯Êý½øÐÐlogout¡£µ«ÊÇ£¬ÊÂʵ֤Ã÷£¬ÔÚlogoutÒÔºó£¬ÔٴεǼµÄʱºò£¬²¢²»Äܵǽ³É¹¦£¬Ñ¹¸ù²»»á½øÈëactionÖ´ÐÐÏàÓ¦µÄ·½·¨£¨hqlÓï¾äҲûÓÐÖ´ÐУ©¡£
Ϊ´Ë£¬¾Ý˵ÓÐÁ½ÖÖ·½·¨½ ......
ÒÔǰÌá½»±íµ¥µÄ·½·¨ÊÇsubmit£¬µ«ÊÇÕâÑùµÄ»°ÎÞ·¨Ê¹ÓÃAjax£¬Ò»Ìá½»¾ÍÒâζ×ÅÐèҪˢÐÂÒ³Ãæ¡£ÁíÒ»ÖÖ·½·¨ÊÇÔÚurlÉÏÃæ¼ÓÉÏparameterÀ´·¢ËÍ±íµ¥£¬µ«ÊÇÕâÑù»á±©Â¶·¢Ë͵ÄÄÚÈÝ¡£µ«ÊÇÈç¹ûÓÃAjax·¢ËÍ±íµ¥µÄ»°¾ÍÄܱÜÃâÉÏÃæÁ½ÖÖÎÊÌâ¡£
µ«ÊÇÎÒ֮ǰ×Ô¼ºÐ´µÄʱºò£¬×ÜÊÇÌá½»µÄÊÇnullÖµ£¬ÔË ......
Ajax µÄ¸ÅÄ
AjaxÌá³öÕßJesse James GarrettÔÚ¡¶Ajax:Ò»¸öWebÓ¦ÓõÄÐÂ;¾¶¡·ÖÐÌáµ½AjaxΪ“Asynchronous JavaScript + XML”µÄ¼ò³Æ£¬Ò²¾ÍÊÇÒì²½µÄJavaScriptºÍXML´¦Àí¡£
ÆäÖаüº¬£º
ÓÃXHTMLºÍCSS½øÐлùÓÚ±ê×¼µÄ±íʾ·½Ê½£º
¡¡¡¡²ÉÓÃDOM(document object model)¶¯Ì ......
°Ñ×Ô¼ºÐ´µÄjqueryдÏÂÀ´
±ÈÈçÏÖÔÚÓÐÒ»¸ö½çÃæ£¬·Ö×óÓÒÁ½²à£¬µ±µã»÷×ó²àµÄ±êÇ©£¬È»ºóÔÚÓÒ²à¿òÏÔʾ£¬ÊµÏÖÎÞˢм¼Êõ£¬ÕâÊÇ×î¼òµ¥µÄajaxÓ¦Óá¡
function touser() {
$.ajax({
url: "UserTable.aspx?timeStamp=" + new Date().getTime(),
success: function(msg) {
$("#ma ......