Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

javascript, json, xml

¡¾×ª×Ô¡¿http://www.cnblogs.com/chenxizhang/archive/2010/01/13/1646255.html
ÔÚÍøÂç±à³ÌÖУ¬ÎÒÃǾ­³£ÐèÒªÓõ½javascript,ÕâЩ¿Í»§¶Ë½Å±¾ÓÖ¾­³£ÐèÒªÓë·þÎñ¶Ë½øÐÐÒì²½µÄͨѶ£¬Ìá½»²¢½ÓÊÕÊý¾Ý¡£ÏÂÃæÕâ¸öÀý×ÓÑÝʾÁËÈçºÎÉè¼Æ·þÎñ£¬ÈçºÎ±àд½Å±¾
1. ·þÎñ¶Ë£¬ÕâÊÇÒ»¸öashxÎļþ
ÐèÒªÌí¼ÓÁ½¸öÒýÓà System.Runtime.SerializationºÍSystem.ServiceModel.Web
using System.Web;
using System.Web.Services;
using System.Runtime.Serialization.Json;
using System.Runtime.Serialization;
using System.IO;
using System.Text;
namespace DynamicTableSample
{
/// <summary>
/// $codebehindclassname$ µÄժҪ˵Ã÷
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class Test : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
//½âÎö¿Í»§¶Ë´«¹ýÀ´µÄÊý¾Ý
var c = context.Request["data"];
var ser = new DataContractJsonSerializer(typeof(Customer));
Customer customer =ser.ReadObject(new MemoryStream(Encoding.UTF8.GetBytes(c))) as Customer;//·´ÐòÁл¯£¬½«×Ö·û´®×ª»»Îª¶ÔÏó
//·µ»Ø½á¹û
ActionResult result = new ActionResult() { ResultCode = 200, Message = "¸Ã²Ù×÷ÒѾ­³É¹¦" };
var ser2 = new DataContractSerializer(typeof(ActionResult));
//Ö±½Ó·µ»Øxml¸ñʽµÄÄÚÈÝ¡£·µ»ØxmlÆäʵÊǸüºÃµÄ£¬ÒòΪÕâ¸ö·þÎñ²Å¸üÓÐͨÓÃÐÔ¡£
ser2.WriteObject(context.Response.OutputStream, result);
}
public bool IsReusable
{
get
{
return false;
}
}
}
public class Customer {

public string CustomerID { get; set; }
public Employee[] Employees { get; set; }
public class Employee
{
public int Id { get; set; }
public string Name { get; set; }
}
}
public class ActionResult
{
public int ResultC


Ïà¹ØÎĵµ£º

JavaScript¾­µäÊé¼®

JavaScriptºËÐļ¼Êõ
http://book.jqcq.com/product/620915.html

±¾Êéͨ¹ýÐí¶à»ùÓÚWebµÄÀý×ÓչʾÁË£ºÈçºÎ¹¹½¨JavaScriptÂß¼­ºÍ½«ËüÓëÏÖÓеĶÔÏó½á¹¹Á¬½Ó£¬ÈçºÎ¹¹½¨×Ô¼ºµÄ³ÌÐò¿âÒÔ¼°ÈçºÎÀûÓÃÆäËûJavaScriptÓû§±àдµÄ³ÌÐò¿â¡£
JavaScript ÍêÈ«ÊÖ²á JavaScript ÍêÈ«ÊÖ²á
http://book.jqcq.com/product/320819.html
......

JavaScript¸÷ÖÖÓ÷¨

1.document.write(""); Êä³öÓï¾ä
2.JSÖеÄ×¢ÊÍΪ//
3.´«Í³µÄHTMLÎĵµË³ÐòÊÇ:document->html->(head,body)
4.Ò»¸öä¯ÀÀÆ÷´°¿ÚÖеÄDOM˳ÐòÊÇ:window->(navigator,screen,history,location,document)
5.µÃµ½±íµ¥ÖÐÔªËصÄÃû³ÆºÍÖµ:document.getElementById("±íµ¥ÖÐÔªËصÄIDºÅ").name(»òvalue)
6.Ò»¸öСдת´ó ......

JavascriptÊý×Ö¸ñʽ»¯/µ¥Î»×ª»¯

×î½üÓÖдÁËÒ»¸öСÍæÒâ¡£ Õâ¸ö¶«Î÷Æäʵ¾ÍÊǽ«Ò»¸öÊýµÄµ¥Î»½øÐÐת»»£¨°Ù-->Íò£»Íò-->ÒÚ£»Ç§-->Ê®µÈ£©
ת»»µÄ˼·¾ÍÊdz˳ý10µÄX´Î·½£¨ÆäʵÓÃ×Ö·ûÊý×é¿ÉÒÔÖ±½ÓÒƶ¯Ð¡ÊýµãµÄλÖÃÕâÖÖ·½Ê½……£©
¸ñʽ»¯µÄ˼·¾ÍÊǽ«ÊäÈëµÄÊý×Ö°´ÕûÊýÓëСÊýÁ½²¿·Ö·Ö¿ª£¬·Ö±ð´¦Àí¡£Ã¿´Õ¹ý3λ¾Í¼ÓÒ»¸ö¶ººÅ£¨½«ÕûÊý»òСÊý ......

CºÍPython³ÌÐòÔ±µÄJavaScriptѧϰָÄÏ£¨Ò룩


write by ¾ÅÌìÑãôá(JTianLing) -- blog.csdn.net/vagrxie
ÌÖÂÛÐÂÎÅ×é¼°Îļþ
 Ô­ÎÄÀ´×Ô£º¡¶JavaScript for C & Python programmers
¡·£¬¾­¹ý×÷ÕßCanisÔÊÐíºó·­Ò룬¼´Ê¹×ªÔØÇ븽´ø´ËÁ´½Ó¡£

Ç°ÑÔ£ººÜÉٸɷ­ÒëµÄÊÂÇ飬ÀÛ£¬ÐÁ¿à£¬²»ÄÜ·¢»Ó£¬µäÐ͵ķÑÁ¦²»Ìֺã¬×î½üÎÞÁÄ£¬ÏëÔÚÍøÒ³ÉÏÏÔʾ¶¯»­£¨ÒòΪCSDNÌ ......

javascript µÄ±Õ°ü

±Õ°ü£¨closure£©ÊÇJavascriptÓïÑÔµÄÒ»¸öÄѵ㣬ҲÊÇËüµÄÌØÉ«£¬ºÜ¶à¸ß¼¶Ó¦Óö¼ÒªÒÀ¿¿±Õ°üʵÏÖ¡£
ÏÂÃæ¾ÍÊÇÎÒµÄѧϰ±Ê¼Ç£¬¶ÔÓÚJavascript³õѧÕßÓ¦¸ÃÊǺÜÓÐÓõġ£
Ò»¡¢±äÁ¿µÄ×÷ÓÃÓò
ÒªÀí½â±Õ°ü£¬Ê×ÏȱØÐëÀí½âJavascriptÌØÊâµÄ±äÁ¿×÷ÓÃÓò¡£
±äÁ¿µÄ×÷ÓÃÓòÎ޷ǾÍÊÇÁ½ÖÖ£ºÈ«¾Ö±äÁ¿ºÍ¾Ö²¿±äÁ¿¡£
JavascriptÓïÑÔµÄÌØÊâÖ®´¦£¬¾ÍÔÚÓ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ