»ùÓÚAJAX·þÎñÆ÷ÍÆCometʵÏÖ
Êý¾Ý±íwords½á¹¹
CREATE TABLE `words` (
`id` int(6) unsigned NOT NULL auto_increment,
`content` varchar(120) NOT NULL default '',
`publish` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
ibox.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Comet demo</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<mce:script type="text/javascript" src="prototype.js" mce_src="prototype.js"></mce:script>
<mce:script type="text/javascript"><!--
va
Ïà¹ØÎĵµ£º
WebÏîÄ¿ÖÐ×ÜÊÇ»áÓõ½Òì²½²Ù×÷£¬ÏÖÔÚµÄÒì²½²Ù×÷¿ÉÒÔÓø÷ÖÖ¸÷ÑùµÄ¿Ø¼þÀ´ÊµÏÖ£¬µ«ÊµÏÖÔÀí»¹ÊÇÒ»ÑùµÄ£¬±¾È˸üϲ»¶Ê¹ÓÃ×îÔʼµÄAjax²Ù×÷ȥʵÏÖÒì²½´¦Àí£¬±¾ÎĽöÏ׸øÄÇЩϲ»¶ÊµÏÖAjaxºÍÏîÄ¿ÖÐÒªÓõ½AjaxµÄÅóÓÑ¡£
AjaxʵÏÖÔÀí¾ÍÊǿͻ§¶Ëͨ¹ýjavascript²Ù×÷µ÷Ó÷ ......
XMLHttpRequest ¶ÔÏóʹ AJAX ³ÉΪ¿ÉÄÜ¡£
XMLHttpRequest
XMLHttpRequest ¶ÔÏóÊÇ AJAX µÄ¹Ø¼ü¡£
¸Ã¶ÔÏóÔÚ Internet Explorer 5.5 Óë 2000 Äê 7 Ô·¢²¼Ö®ºó¾ÍÒѾ¿ÉÓÃÁË£¬µ«ÊÇÔÚ 2005 ÈËÃÇ¿ªÊ¼ÌÖÂÛ AJAX ºÍ Web 2.0 ֮ǰ£¬Õâ¸ö¶ÔÏó²¢Ã»Óеõ½³ä·ÖµÄÈÏʶ¡£
´´½¨ XMLHttpRequest ¶ÔÏó
²»Í¬µÄä¯ÀÀÆ÷ʹÓò»Í¬µÄ·½·¨À´´´½¨ ......
¸Õµ÷ÊÔ³ÌÐòµÄʱºò±¨´íºóÈ»ºóÕҵĽâ¾ö·½·¨£¬ÏÖÔÚ·¢³öÀ´´ó¼Ò½è¼ø¡£
-----------------------
´íÎóÌáʾ£º
ÔËÐÐʱ´íÎó 800a01b6
¶ÔÏó²»Ö§³Ö´ËÊôÐÔ»ò·½·¨: Response.CharSet
---------------------------------------------------------------------
(°Ù¶Èһϣ¬»¹ÓкܶàÈËÓöµ½Í¬ÑùµÄ´íÎó)
Micros ......
ÇëÇó·½Ê½£¬·ÖΪGETÓëPOST£º
GET
×îΪ³£¼ûµÄHTTPÇëÇ󣬯ÕͨÉÏÍøä¯ÀÀÒ³Ãæ¾ÍÊÇGET¡£GET·½Ê½µÄ²ÎÊýÇëÇóÖ±½Ó¸úÔÚURLºó£¬ÒÔÎʺſªÊ¼¡££¨JSÖÐÓÃwindow.location.search»ñµÃ£©¡£²ÎÊý¿ÉÒÔÓÃencodeURIComponent½øÐбàÂ룬ʹÓ÷½Ê½:
var EnParam = encodeURIComponent(param);
URLÖ»Ö§³Ö´óÔ¼2KµÄ³¤¶È£¬¼´2 ......
Html´úÂ룺
<%@ page language="java" pageEncoding="utf-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>jquery ajax</title>
<link rel="stylesheet" type="text/css" media="screen"
......