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>