博客园  :: 首页  :: 新随笔  :: 联系 :: 管理

2010年5月25日

摘要: Want to convert a C# object into it's JSON equivalent? Here is a simple object from the System.Web.Script namespace that does exactly that:System.Web.Script.Serialization.JavaScriptSerializer . It is stored in the System.Web.Extentions DLL (.Net Framework 3.5 only)Using this object we serialize 阅读全文

posted @ 2010-05-25 20:52 codingsilence 阅读(264) 评论(0) 推荐(0) 编辑

摘要: Js代码1 var arr1 = [ "one", "two", "three", "four", "five" ]; 2 $.each(arr1, function(){ 3 alert(this); 4 }); 5 输出:one two three four five 6 var arr2 = [[1, 2, 3], [4, 5, 6], [7, 8, 9]] 7 $.each(arr2, function(i, item){ 8 alert(item[0]); 9 }); 10 输出:1 阅读全文

posted @ 2010-05-25 15:47 codingsilence 阅读(107) 评论(0) 推荐(0) 编辑