AjaxÌØÐ§ ¶¯Ì¬¼ÓÔØµÄFAQ Ö®¶þ
±¾ÊµÀýʹÓÃÃûΪfaqµÄÊý¾Ý¿â±í£¬°üº¬µÄÊý¾ÝÈçͼ1.2Ëùʾ¡£¾ßÌåµÄ´´½¨Êý¾Ý±íÓï¾äÈçÏ£º
CREATE TABLE 'faq' (
'id' int(11) NOT NULL auto_increment,
'faq' varchar(255) NOT NULL,
'detail' varchar(255) NOT NULL,
PRIMARY KEY ('id')
)
ͼ1.2 ±ífaq°üº¬µÄÊý¾Ý
Ö÷Òª°üÀ¨Á½¸öÎļþ£ºÓû§²Ù×÷½çÃæindex.jspºÍ·þÎñÆ÷¶ËÏìÓ¦Îļþread_faq.jsp¡£
Ïà¹ØÎĵµ£º
Ê×Ïȶ¼ÊÇʹÓÃVS.Net2005´´½¨Ò»¸ö ASP.Net AJAX-Enabled Web Application
1¡¢Ê¹ÓÃAJAXÖ±½Óµ÷Óúǫ́·½·¨£º
ºǫ́´úÂ룺
namespace AJAX1
{
public partial class _Default : System.Web.UI.Page
{
// ÐèÒª±êʶΪWebMethod ......
ÏÈÀ´Ð´Ò»¸ö¼òµ¥µÄAjax³ÌÐò£¬Ê¹Ó÷Çͬ²½µÄ·½Ê½Ïò·þÎñÆ÷¶ËÈ¡µÃTXTÎļþÖеÄÄÚÈÝ£¬²¢¼ÓÒÔÏÔʾ¡£Ê×ÏÈ£¬Çë×¼±¸Ò»¸öHelloAjax.aspx(HTMLÒ²¿É)£º
*HelloAjax.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HelloAjax.aspx.cs" Inherits="HelloAjax._Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD ......
XMLHTTPRequestÊÇÒÀ¸½ÓÚä¯ÀÀÆ÷µÄÒ»¸ö×é¼þ£¬ä¯ÀÀÆ÷²»Í¬Õë¶ÔµÄ×é¼þÃû³ÆÒ²²»Í¬¡£XMLHTTPRequestÊÇFirefoxÖÐ×é¼þµÄÃû³Æ£¬ÔÚIEÖнÐXMLHTTP¡£“XMLHTTP”ÓÐÁ½¸öÓŵ㣺¾Ö²¿Ë¢Ð¡¢Òì²½¶ÁÈ¡¡£
AjaxµÄʵÏÖ²½Ö裺
1¡¢ ´´½¨Òì²½¶ÔÏó£º
ÔÚIEÖУºvar xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
......
1£¬Ð½¨Ò»ÃûΪlogin.htmµÄ¾²Ì¬ÍøÒ³Îļþ£¬×÷ΪµÇÂ¼Ò³Ãæ£¬Èçͼ
body±êÇ©´úÂë
<body onkeydown ="enterLogin()"> <!--Ìí¼Ó°´Ï¼üÅÌʼþ-->
<div style="text-align: center" mce_style="text-align: center">
<table border="1" cellpadding="1">
<tr>
<td align="center" s ......
Figure A MaskedEdit À©Õ¹Æ÷ÊôÐÔ
ÊôÐÔ
ĬÈÏÖµ
˵Ã÷
AcceptAMPM
False
Ò»¸ö²¼¶ûÊôÐÔ£¬ÓÃÓÚָʾÊÇ·ñӦʹÓà AM/PM ·ûºÅ¡£
AcceptNegative
None
ָʾÊÇ·ñÔÊÐíʹÓøººÅ (-)¡£À´×Ô MaskedEditShowSymbol ö¾ÙµÄ¿ÉÓÃÖµ°üÀ¨£ºNone¡¢Left ºÍ Right¡£
AutoComplete
True
Ò»¸ö²¼¶ûÊôÐÔ£¬ÓÃÓÚÖ¸Ê ......