<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title><!-- Insert your title here --></title>
<script src="jquery.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
var url = "Default.aspx";
$.ajax({
type: "GET",
url: "Default.aspx",
success: function(msg) {
// Do magic here.
console.log(msg);
}
});
$.get(url, function(response){
console.log(response);
});
$.getJSON(url).done(function(response) {
console.log(response);
//return;
var posts = response.posts; //here's your response
$('body').append('<ul>');
var li = "", list = [];
$.each(posts,function (index, rObj) {
//console.log(rObj);
li = "";
li += "<li>Title : "+rObj.title+"</li>";
li += "<li>Date : "+rObj.date+"</li>";
li += "<li>Excerpt : "+rObj.excerpt+"</li>";
li += "<li>ID : "+rObj.id+"</li>";
li += "<li>Content : "+rObj.content+"</li>";
var attachment = rObj.attachments;
li += "<li>Video : "+attachment[0].url+"</li>";
list[index]=li;
});
list = list.reverse();
$('ul').append("<li>Count total : "+response.count_total+"</li>");
$('ul').append("<li>Pages : "+response.pages+"</li>");
$('ul').append("<li>Count : "+response.count+"</li>");
$('ul').append(list.join(''));
$('body').append('</ul>');
})
.fail(function( jqxhr, textStatus, error ) {
var err = textStatus + ', ' + error;
console.log( "Request Failed: " + err);
});
});
</script>
</head>
<body>
<!-- Insert your content here -->
</body>
</html>
json_output.rar_json c
版权申诉
34 浏览量
2022-09-19
20:42:42
上传
评论
收藏 35KB RAR 举报
weixin_42653672
- 粉丝: 93
- 资源: 1万+
最新资源
- TG-2024-05-23-204718255.mp4
- 候志强@181 5428 8938_20240420112107.amr
- spispispispispi
- 实验二:IP协议分析.zip
- 驱动代码驱动代码驱动代码驱动代码
- SVID_20240523_141155_1.mp4
- Code for the complete guide to tkinter tutorial
- 关于百货中心供应链管理系统.zip
- SimpleFolderIcon-master 修改Unity的Project下的文件夹图标
- A python Tkinter widget to display tile based maps
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈