【 tulaoshi.com - Web开发 】
                             
                             代码如下:
//栏目 
//发送ajax请求 
$.getJSON( 
"../../../Templet/GetInfoHandler.ashx", //产生JSON数据的服务端页面 
{id: "0", sid: "1;2;3", rid: Math.round(Math.random() * 10) }, //向服务器发出的查询字符串 
//对返回的JSON数据进行处理 
function(json) { 
//循环取json中的数据,并呈现在列表中 
$("#column_0_1").empty(); 
var colstr = 'h2spana href="#" href="#"更多/a/span热门招聘/h2ul'; 
$.each(json, function(i) { 
//alert(json[i].news_id); 
colstr = colstr + 'lia href="http://www.ishixi.com/news/html/' + json[i].new_file_name + '" href="http://www.ishixi.com/news/html/' + json[i].new_file_name + '"' + json[i].news_title + '/a/li'; 
}) 
colstr = colstr + '/ul'; 
$("#column_0_1").html(colstr); 
alert("加载成功"); 
// }) 
用Litjson生成json数据的C#程序:
 代码如下:
//栏目 
//发送ajax请求 
$.getJSON( 
"../../../Templet/GetInfoHandler.ashx", //产生JSON数据的服务端页面 
{id: "0", sid: "1;2;3", rid: Math.round(Math.random() * 10) }, //向服务器发出的查询字符串 
//对返回的JSON数据进行处理 
function(json) { 
//循环取json中的数据,并呈现在列表中 
$("#column_0_1").empty(); 
var colstr = 'h2spana href="#" href="#"更多/a/span热门招聘/h2ul'; 
$.each(json, function(i) { 
//alert(json[i].news_id); 
colstr = colstr + 'lia href="http://www.ishixi.com/news/html/' + json[i].new_file_name + '" href="http://www.ishixi.com/news/html/' + json[i].new_file_name + '"' + json[i].news_title + '/a/li'; 
}) 
colstr = colstr + '/ul'; 
$("#column_0_1").html(colstr); 
alert("加载成功"); 
// })