ajax,请求

<script type="text/javascript">
ajax_ashx();
function ajax_ashx() {
$.ajax({
url: "/",
type: "get",
success: function (data) {
tp = " <caption> </caption><tr><th scope=\"col\"></th><th scope=\"col\"></th><th scope=\"col\"></th></tr>";
// alert(data);
$.each(data, function (index, item) {
tp += " <tr><td class=\"row\">" + item["Name"] + "</td>";
tp += "<td class=\"row\">" + item["Count"] + "</td>";
tp += "<td class=\"row\">" + item["Sum"] + "</td></tr>";
});
$(".listt").html(tp);
},
cache: false,
timeout: 5000,
error: function () {

}
});
}

</script>

posted @ 2015-06-19 10:53  haungfeifei  阅读(114)  评论(0编辑  收藏  举报