jquery ajaxѧϰ
http://hi.baidu.com/cxzhang/blog/item/0166563892cc65fbb211c7b0.html.
http://topic.csdn.net/t/20030527/22/1842509.html
using System;
using System.Data;
using System.Text;
using System.Collections.Generic;
using System.Reflection;
public class ToJson
{
/// <summary>
/// datatable to json
/// </summary>
/// <param name="dt"></param>
/// <returns></returns>
public static string DataTableToJson(DataTable dt)
{
StringBuilder JsonString = new StringBuilder();
if (dt != null && dt.Rows.Count > 0)
{
JsonString.Append("[ ");
for (int i = 0; i < dt.Rows.Count; i++)
{
JsonString.Append("{ ");
for (int j = 0; j < dt.Columns.Count; j++)
{
if (j ==0)
{
JsonString.Append("\"" + dt.Columns[j].ColumnName.ToString() + "\":" + "\"" + dt
Ïà¹ØÎĵµ£º
ÈçÉÏͼËùʾΪAccordion¿Ø¼þ£º
¸Ð¾õ²»´íµÄÑùʽ
<style type="text/css">
.headerBg{cursor:hand;text-align:center;width:180px;height:21px;background-image:url(images/ajaxmenubg1.gif);FONT-SIZE: 12px;line-height:21px;} ......
ºÃ¾Ã²»ÅöWEBµÄ¶«¶«ÁË,×î½üѧϰ£Ó£Á£ÐµÄ£Â£Ó£Ð¼¼Êõ£¬ÓÖÓõ½ÕâЩ£¬Ë³±ãתƪÎÄÕ£¬±¸²é£®
ÔÎĵØÖ·: http://www.ibm.com/developerworks/cn/xml/x-ajaxxml2/
Ajax ºÍ XML:
Îå
ÖÖ³£¼û Ajax ģʽ
¿ÉÁ¢¼´Ê¹ÓÃÕâЩ·Ç³£ÓÐÓÃµÄ Ajax Éè¼ÆÄ£Ê½
ÎĵµÑ¡Ïî
<tr valign="top"><td width="8">< ......
/*ÔÚÓÐÖÐÎIJÎÊýʱ,½ÓÊÕ·½ÐèҪʹÓÃUTF-8·½Ê½¶ÔÊý¾Ý½øÐнâÂë
*²»Ö§³Öpost¸½¼þ
*/
function getXmlHttpRequest() {
var xmlHttpRequest = null;
try {
xmlHttpRequest = new ActiveXObject("Msxml2.XMLHTTP");
} ......
¸ÕѧϰASP.NET AJAX¿ª·¢£¬½ñÌìÓöµ½Ò»¸öÆæ¹ÖµÄÎÊÌ⣬¿ÉÄÜÊÇ×Ô¼º²»ÊìµÄÔÒò£¡£¡
ÔÚvs2005Æô¶¯µÄʱºò£¬ÔÚasmxÎļþÖУ¬Ìí¼Ó¶Ïµã£¬Æô¶¯µ÷ÊÔÄÜÕý³£½øÈëµ½µ÷ÊÔÒ³Ãæ£¬È»ºóÐÞ¸ÄasmxÒ³ÃæÒÔºó£¬
ÖØÐÂÆô¶¯µ÷ÊÔ£¬¾Í²»ÄÜÕý³£½øÈëµ½asmxÎļþÖеĶϵ㣬¶øÇÒÎļþÐ޸ĵĵط½£¬¶ÔÓÚÒ³Ãæµ÷ÓÃÖ±½ÓÎÞЧ£¬ÏÔʾЧ¹ûʼÖÕÊÇÐÞ¸ÄǰµÄЧ¹û£¡£¡
......
ÔÚ¡¶Pragmatic Ajax A Web 2.0 Primer ¡·ÖÐżȻ¿´µ½¶ÔreadyStae״̬µÄ½éÉÜ£¬¸Ð¾õÕâ¸ö½éÉܺÜʵÔÚ£¬ÕªÒëÈçÏ£º
0: (Uninitialized) the send( ) method has not yet been invoked.
1: (Loading) the send( ) method has been invoked, request in progress.
2: (Loaded) the send( ) method has completed, entire respons ......