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
Ïà¹ØÎĵµ£º
ÔÚʹÓÃjQuery µÄAjax¼ÓÔØÊý¾ÝÊÇ Èç¹ûʹÓÃget·½Ê½´«µÝ²ÎÊýÔò´æÔÚÒ»ÏÂÎÊÌâ
firefoxÏ´«µÝÊý¾ÝÕý³£
ieÏÂÔò»á³öÏÖ»º´æÎÊÌâ
½â¾ö·½·¨£º
1¡¢http://yourwebsite?parseInt(Math.random() * 1000) ÔÚurlºóÃæ¼ÓÉÏÒ»¸öËæ¼´Êý£¬ÕâÑùÿ´Î·¢Ë͵ľͲ»Ò»ÑùÁË£¬¶øÇÒ²»Ó°ÏìÄãµÄ¹¦ÄÜ.
2¡¢Ê¹ÓÃpost´«µÝ²ÎÊý
......
jQueryѧϰ±Ê¼Ç
Ìá½»form±íµ¥Ö®ºó£¬²»»áË¢ÐÂÒ³Ã棬¶øÊǾֲ¿Ë¢Ð£¬ÓûÌá½»µÄformÖ»ÒªÓÐid¼´¿É
Èç¹ûʹÓÃgetÇëÇó£¬×¢ÒâÖÐÎÄÂÒÂëÎÊÌ⣬jquery»áÏÈʹÓÃiso8859-1½âÂ룬Ȼºó·¢¸ø·þÎñÆ÷£¬Èç¹ûʹÓÃpostÇëÇó£¬ÔòÖ±½Ó½«ÖÐÎÄÄÚÈÝÌá½»¸ø·þÎñÆ÷½âÎö¡£
ʹÓÃjquery-1.4.2.jsºÍjquery.form.js²å¼þ¡£
Èç¹û´´½¨ÐµÄjsÎļþÖУ¬ÐèÒª¼ÓÉÏ
doc ......
Ajax
Ö÷
Òª×é³É²¿·Ö
Ajax
ÊÇ
Asynchronous JavaScript and XML
£¨ÒÔ
¼°
DHTML
µÈ£©µÄËõд¡£
Ajax
ÓÉ
HTML
¡¢
JavaScript™
¼¼Êõ¡¢
DHTML
ºÍ
DOM
×é³É£¬ÕâÒ»½Ü³öµÄ·½·¨¿ÉÒÔ½«±¿×¾µÄ
Web
½çÃæת»¯³É½»»¥ÐÔµÄ
Ajax
Ó¦ÓóÌÐò¡£
AjaxµÄºËÐÄÊÇJavaScript¶ÔÏó XmlHttpRequest¡£¸Ã¶ÔÏóÔ ......
<html>
<body>
<script type="text/javascript">
function ajaxFunction()
{
var xmlHttp;
try
{
// Firefox, Opera 8.0+, Safari
xmlHttp=new XMLHttpRequest();
}
catch (e)
{
// Inte ......
¸ÕѧϰASP.NET AJAX¿ª·¢£¬½ñÌìÓöµ½Ò»¸öÆæ¹ÖµÄÎÊÌ⣬¿ÉÄÜÊÇ×Ô¼º²»ÊìµÄÔÒò£¡£¡
ÔÚvs2005Æô¶¯µÄʱºò£¬ÔÚasmxÎļþÖУ¬Ìí¼Ó¶Ïµã£¬Æô¶¯µ÷ÊÔÄÜÕý³£½øÈëµ½µ÷ÊÔÒ³Ã棬ȻºóÐÞ¸ÄasmxÒ³ÃæÒÔºó£¬
ÖØÐÂÆô¶¯µ÷ÊÔ£¬¾Í²»ÄÜÕý³£½øÈëµ½asmxÎļþÖеĶϵ㣬¶øÇÒÎļþÐ޸ĵĵط½£¬¶ÔÓÚÒ³Ãæµ÷ÓÃÖ±½ÓÎÞЧ£¬ÏÔʾЧ¹ûʼÖÕÊÇÐÞ¸ÄÇ°µÄЧ¹û£¡£¡
......