英文:
How to combine json code to show comment number
问题
最近我为我的博客或博客网站创建了一个简单的代码,用来显示作者的数据,比如作者的名字、URL、图片和他们发布的帖子数量。
然后我尝试显示作者的评论数量。通过这个URL https://tailwindbt.blogspot.com/feeds/comments/default?alt=json-in-script&max-results=500&callback=handleJsonpData
,我们可以获取博客网站的所有评论。在这里,我们可以获取所有评论以及作者的姓名、评论消息等。
所以我尝试着显示作者的评论数量,并将其显示在他们的名字旁边。我编写了这段代码,但它没有起作用。我的博客网站有三位作者,其中任何一位都在网站上有一些评论。
我的代码分为两个部分。我想将两段代码组合起来,如果作者有任何评论,就显示作者的评论数量。
这是第一部分用于获取评论。在这里,我手动输入了一个名字,并检查了该名字是否有评论,并显示了评论数量。
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<div id="comment-count"></div>
<div id="iacman-comment-count"></div>
<script>
function displayCommentCount(data) {
var totalCommentCount = 0;
var iacmanCommentCount = 0;
if ('entry' in data.feed) {
totalCommentCount = data.feed.entry.length;
for (var i = 0; i < data.feed.entry.length; i++) {
var authorName = data.feed.entry[i].author[0].name.$t;
if (authorName === 'Iacman') {
iacmanCommentCount++;
}
}
}
document.getElementById('comment-count').innerHTML = '<h2>Total Comments: ' + totalCommentCount + '</h2>';
document.getElementById('iacman-comment-count').innerHTML = '<h2>Comments by Iacman: ' + iacmanCommentCount + '</h2>';
}
function handleJsonpData(data) {
displayCommentCount(data);
}
var script = document.createElement('script');
script.src = 'https://tailwindbt.blogspot.com/feeds/comments/default?alt=json-in-script&max-results=500&callback=handleJsonpData';
document.body.appendChild(script);
</script>
这是第二部分用于获取博客作者的详细信息。
<link href='https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/2.2.19/tailwind.min.css' rel='stylesheet'/>
<script crossorigin='anonymous' src='https://kit.fontawesome.com/7dfc182d96.js'></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<style>.author-image {cursor: pointer;}</style>
<div class="mb-0 mt-12">
<h4 class="mb-0 text-black dark:text-gray-300"><i class="fa-solid fa-user-vneck-hair"></i> Authors and Writers </h4>
</div>
<div class="tbt_all_authors-list mt-0 mb-16 grid grid-cols-1 sm:grid-cols-1 md:grid-cols-3 lg:grid-cols-3 xl:grid-cols-3 gap-5"></div>
<script>
let feedURL = "https://tailwindbt.blogspot.com/feeds/posts/default?alt=json-in-script&callback=?&max-results=500";
$.getJSON(feedURL, function(data) {
let authors = [];
$.each(data.feed.entry, function(index, entry) {
if (entry.author) {
let authorName = entry.author[0].name.$t;
let authorImage = entry.author[0].gd$image.src;
let authorProfileUrl = entry.author[0].uri.$t; // 提取作者的个人资料URL
let authorExists = false;
let authorIndex;
$.each(authors, function(index, author) {
if (author.name === authorName) {
authorExists = true;
authorIndex = index;
}
});
if (authorExists) {
authors[authorIndex].count++;
} else {
authors.push({ name: authorName, image: authorImage, count: 1, profileUrl: authorProfileUrl });
}
}
});
authors.sort(function(a, b) {
return b.count - a.count;
});
$.each(authors, function(index, author) {
let html = '<div class="flex bg-white dark:bg-gray-700 dark:text-gray-300 shadow rounded">' +
'<a href="' + author.profileUrl + '" target="_blank" class="author-image flex items-start px-3 py-3">' +
'<div class="w-20 h-20 rounded-full object-cover mr-4 shadow" style="background-image: url(' + author.image + '); background-repeat: no-repeat; background-position: center; background-size: cover;"></div>' +
'<div class="">' +
'<div class="flex items-center justify-between">' +
'<div class="text-md font-semibold text-gray-900 dark:text-gray-300 mt-3">' + author.name + '</div>' +
'</div>' +
'<div class="text-gray-700 dark:text-gray-400">Posts: ' + author.count + ' </div>' +
'</div>' +
'</a>' +
'</div>';
$('.tbt_all_authors-list').append(html);
});
});
</script>
我想要将这两段代码合并,以查找作者的评论数量。如果作者有任何评论,它应该自动显示出来。我不知道如何将这两段代码合并,以显示作者的评论数量,如果作者有任何评论。有人可以帮助我找出解决方法吗?我已经尝试了很多方法,但都没有成功。
英文:
Recently I have created a simple code for my blogger or blogspot website to show Author's Data, like author's name with URL, image and their published Posts number.
Then I tried to show the comments number of the Author's. By this url https://tailwindbt.blogspot.com/feeds/comments/default?alt=json-in-script&max-results=500&callback=handleJsonpData
we can get a blogger websites all comments. Here we can get All comments with the Name, Comments Messages and many.
So what I tried, to show the number of comments of the Author's alongside their name. I have write this code, but It's not working. There are three author in my blog site, any one of them have some comments in the site.
There are two sectors of my code. I want to make a combination of both code to show comments number of the authors if the authors have any comment.
This is 1st part to get comments. Here I manually applied a name and checked if the name have comments, and show the number.
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<div id="comment-count"></div>
<div id="iacman-comment-count"></div>
<script>
function displayCommentCount(data) {
var totalCommentCount = 0;
var iacmanCommentCount = 0;
if ('entry' in data.feed) {
totalCommentCount = data.feed.entry.length;
for (var i = 0; i < data.feed.entry.length; i++) {
var authorName = data.feed.entry[i].author[0].name.$t;
if (authorName === 'Iacman') {
iacmanCommentCount++;
}
}
}
document.getElementById('comment-count').innerHTML = '<h2>Total Comments: ' + totalCommentCount + '</h2>';
document.getElementById('iacman-comment-count').innerHTML = '<h2>Comments by Iacman: ' + iacmanCommentCount + '</h2>';
}
function handleJsonpData(data) {
displayCommentCount(data);
}
var script = document.createElement('script');
script.src = 'https://tailwindbt.blogspot.com/feeds/comments/default?alt=json-in-script&max-results=500&callback=handleJsonpData';
document.body.appendChild(script);
</script>
This is the second part to get The Blog Author's Details.
<link href='https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/2.2.19/tailwind.min.css' rel='stylesheet'/>
<script crossorigin='anonymous' src='https://kit.fontawesome.com/7dfc182d96.js'></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<style>.author-image {cursor: pointer;}</style>
<div class="mb-0 mt-12">
<h4 class="mb-0 text-black dark:text-gray-300"><i class="fa-solid fa-user-vneck-hair"></i> Authors and Writers </h4>
</div>
<div class="tbt_all_authors-list mt-0 mb-16 grid grid-cols-1 sm:grid-cols-1 md:grid-cols-3 lg:grid-cols-3 xl:grid-cols-3 gap-5"></div>
<script>
let feedURL = "https://tailwindbt.blogspot.com/feeds/posts/default?alt=json-in-script&callback=?&max-results=500";
$.getJSON(feedURL, function(data) {
let authors = [];
$.each(data.feed.entry, function(index, entry) {
if (entry.author) {
let authorName = entry.author[0].name.$t;
let authorImage = entry.author[0].gd$image.src;
let authorProfileUrl = entry.author[0].uri.$t; // Extract the author profile URL
let authorExists = false;
let authorIndex;
$.each(authors, function(index, author) {
if (author.name === authorName) {
authorExists = true;
authorIndex = index;
}
});
if (authorExists) {
authors[authorIndex].count++;
} else {
authors.push({ name: authorName, image: authorImage, count: 1, profileUrl: authorProfileUrl });
}
}
});
authors.sort(function(a, b) {
return b.count - a.count;
});
$.each(authors, function(index, author) {
let html = '<div class="flex bg-white dark:bg-gray-700 dark:text-gray-300 shadow rounded">' +
'<a href="' + author.profileUrl + '" target="_blank" class="author-image flex items-start px-3 py-3">' +
'<div class="w-20 h-20 rounded-full object-cover mr-4 shadow" style="background-image: url(' + author.image + '); background-repeat: no-repeat; background-position: center; background-size: cover;"></div>' +
'<div class="">' +
'<div class="flex items-center justify-between">' +
'<div class="text-md font-semibold text-gray-900 dark:text-gray-300 mt-3">' + author.name + '</div>' +
'</div>' +
'<div class="text-gray-700 dark:text-gray-400">Posts: ' + author.count + ' </div>' +
'</div>' +
'</a>' +
'</div>';
$('.tbt_all_authors-list').append(html);
});
});
</script>
I want to combine both codes to find the comment number of the Author's. If Authors have any comment, it should show the number automatically. I don't know how to combine both codes to show the comments number of author if Authors have any comment. Somebody please help me to find out. I tried in many ways, but not working.
答案1
得分: 2
你的代码中主要问题是在displayCommentCount函数中尝试访问author.name,但是在该函数的作用域中未定义author。author是在$.getJSON回调函数中定义的,并且不是全局可访问的。
要解决这个问题,你需要更新displayCommentCount函数,将authorName作为参数传递进去,然后将其与每个评论的作者名称进行比较。
以下是你代码的已更正版本:
<link href='https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/2.2.19/tailwind.min.css' rel='stylesheet'/>
<script crossorigin='anonymous' src='https://kit.fontawesome.com/7dfc182d96.js'></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<style>.author-image {cursor: pointer;}</style>
<div class="mb-0 mt-12">
<h4 class="mb-0 text-black dark:text-gray-300"><i class="fa-solid fa-user-vneck-hair"></i> Authors and Writers </h4>
</div>
<div class="tbt_all_authors-list mt-0 mb-16 grid grid-cols-1 sm:grid-cols-1 md:grid-cols-3 lg:grid-cols-3 xl:grid-cols-3 gap-5"></div>
<script>
var commentData;
function getCommentCount(authorName) {
var sfwCommentCount = 0;
if ('entry' in commentData.feed) {
for (var i = 0; i < commentData.feed.entry.length; i++) {
var commentAuthorName = commentData.feed.entry[i].author[0].name.$t;
if (commentAuthorName === authorName) {
sfwCommentCount++;
}
}
}
return sfwCommentCount;
}
function handleJsonpData(data) {
commentData = data;
}
var script = document.createElement('script');
script.src = 'https://tailwindbt.blogspot.com/feeds/comments/default?alt=json-in-script&max-results=500&callback=handleJsonpData';
document.body.appendChild(script);
let feedURL = "https://tailwindbt.blogspot.com/feeds/posts/default?alt=json-in-script&callback=?&max-results=500";
$.getJSON(feedURL, function(data) {
let authors = [];
$.each(data.feed.entry, function(index, entry) {
if (entry.author) {
let authorName = entry.author[0].name.$t;
let authorImage = entry.author[0].gd$image.src;
let authorAbout = '';
if (entry.author[0].gd$about) {
authorAbout = entry.author[0].gd$about.$t;
}
let authorProfileUrl = entry.author[0].uri.$t; // Extract the author profile URL
let authorExists = false;
let authorIndex;
$.each(authors, function(index, author) {
if (author.name === authorName) {
authorExists = true;
authorIndex = index;
}
});
if (authorExists) {
authors[authorIndex].count++;
} else {
authors.push({ name: authorName, image: authorImage, count: 1, about: authorAbout, profileUrl: authorProfileUrl });
}
}
});
authors.sort(function(a, b) {
return b.count - a.count;
});
$.each(authors, function(index, author) {
let authorCommentCount = getCommentCount(author.name);
let html = '<div class="flex bg-white dark:bg-gray-700 dark:text-gray-300 shadow rounded">' +
'<a href="' + author.profileUrl + '" target="_blank" class="author-image flex items-start px-3 py-3">' +
'<div class="w-20 h-20 rounded-full object-cover mr-4 shadow" style="background-image: url(' + author.image + '); background-repeat: no-repeat; background-position: center; background-size: cover;"></div>' +
'<div class="">' +
'<div class="flex items-center justify-between">' +
'<div class="text-md font-semibold text-gray-900 dark:text-gray-300 mt-3">' + author.name + '</div>' +
'</div>' +
'<div class="text-gray-700 dark:text-gray-400">Posts: ' + author.count + ' </div>' +
'<div class="text-gray-700 dark:text-gray-400">Comments: ' + authorCommentCount + ' </div>' +
'</div>' +
'</a>' +
'</div>';
$('.tbt_all_authors-list').append(html);
});
});
</script>
希望这可以帮助你解决问题!
英文:
The main problem in your code is that you're trying to access author.name in the displayCommentCount function, but author is not defined within the scope of that function. author is defined in the $.getJSON callback function and it is not globally accessible.
To fix the issue, you need to update your displayCommentCount function to accept authorName as a parameter, then compare it with each comment author's name.
Here's the corrected version of your code:
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-html -->
<link href='https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/2.2.19/tailwind.min.css' rel='stylesheet'/>
<script crossorigin='anonymous' src='https://kit.fontawesome.com/7dfc182d96.js'></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<style>.author-image {cursor: pointer;}</style>
<div class="mb-0 mt-12">
<h4 class="mb-0 text-black dark:text-gray-300"><i class="fa-solid fa-user-vneck-hair"></i> Authors and Writers </h4>
</div>
<div class="tbt_all_authors-list mt-0 mb-16 grid grid-cols-1 sm:grid-cols-1 md:grid-cols-3 lg:grid-cols-3 xl:grid-cols-3 gap-5"></div>
<script>
var commentData;
function getCommentCount(authorName) {
var sfwCommentCount = 0;
if ('entry' in commentData.feed) {
for (var i = 0; i < commentData.feed.entry.length; i++) {
var commentAuthorName = commentData.feed.entry[i].author[0].name.$t;
if (commentAuthorName === authorName) {
sfwCommentCount++;
}
}
}
return sfwCommentCount;
}
function handleJsonpData(data) {
commentData = data;
}
var script = document.createElement('script');
script.src = 'https://tailwindbt.blogspot.com/feeds/comments/default?alt=json-in-script&max-results=500&callback=handleJsonpData';
document.body.appendChild(script);
let feedURL = "https://tailwindbt.blogspot.com/feeds/posts/default?alt=json-in-script&callback=?&max-results=500";
$.getJSON(feedURL, function(data) {
let authors = [];
$.each(data.feed.entry, function(index, entry) {
if (entry.author) {
let authorName = entry.author[0].name.$t;
let authorImage = entry.author[0].gd$image.src;
let authorAbout = '';
if (entry.author[0].gd$about) {
authorAbout = entry.author[0].gd$about.$t;
}
let authorProfileUrl = entry.author[0].uri.$t; // Extract the author profile URL
let authorExists = false;
let authorIndex;
$.each(authors, function(index, author) {
if (author.name === authorName) {
authorExists = true;
authorIndex = index;
}
});
if (authorExists) {
authors[authorIndex].count++;
} else {
authors.push({ name: authorName, image: authorImage, count: 1, about: authorAbout, profileUrl: authorProfileUrl });
}
}
});
authors.sort(function(a, b) {
return b.count - a.count;
});
$.each(authors, function(index, author) {
let authorCommentCount = getCommentCount(author.name);
let html = '<div class="flex bg-white dark:bg-gray-700 dark:text-gray-300 shadow rounded">' +
'<a href="' + author.profileUrl + '" target="_blank" class="author-image flex items-start px-3 py-3">' +
'<div class="w-20 h-20 rounded-full object-cover mr-4 shadow" style="background-image: url(' + author.image + '); background-repeat: no-repeat; background-position: center; background-size: cover;"></div>' +
'<div class="">' +
'<div class="flex items-center justify-between">' +
'<div class="text-md font-semibold text-gray-900 dark:text-gray-300 mt-3">' + author.name + '</div>' +
'</div>' +
'<div class="text-gray-700 dark:text-gray-400">Posts: ' + author.count + ' </div>' +
'<div class="text-gray-700 dark:text-gray-400">Comments: ' + authorCommentCount + ' </div>' +
'</div>' +
'</a>' +
'</div>';
$('.tbt_all_authors-list').append(html);
});
});
</script>
<!-- end snippet -->
答案2
得分: 0
你在HTML元素中使用了sfwCommentCount
变量,但超出了其作用域,这就是为什么它不起作用的原因。
<!-- 开始代码片段:js 隐藏:false 控制台:true Babel:false -->
<!-- 语言:lang-html -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/2.2.19/tailwind.min.css" rel="stylesheet" />
<script crossorigin="anonymous" src="https://kit.fontawesome.com/7dfc182d96.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<style>
.author-image {
cursor: pointer;
}
</style>
<div class="mb-0 mt-12">
<h4 class="mb-0 text-black dark:text-gray-300"><i class="fa-solid fa-user-vneck-hair"></i> Authors and Writers</h4>
</div>
<div
class="tbt_all_authors-list mt-0 mb-16 grid grid-cols-1 sm:grid-cols-1 md:grid-cols-3 lg:grid-cols-3 xl:grid-cols-3 gap-5"></div>
<script>
let feedURL = "https://tailwindbt.blogspot.com/feeds/posts/default?alt=json-in-script&callback=?&max-results=10";
let authors = [];
$.getJSON(feedURL, function (data) {
$.each(data.feed.entry, function (index, entry) {
if (entry.author) {
let authorName = entry.author[0].name.$t;
let authorImage = entry.author[0].gd$image.src;
let authorAbout = "";
if (entry.author[0].gd$about) {
authorAbout = entry.author[0].gd$about.$t;
}
let authorProfileUrl = entry.author[0].uri.$t; // 提取作者个人资料链接
let authorExists = false;
let authorIndex;
$.each(authors, function (index, author) {
if (author.name === authorName) {
authorExists = true;
authorIndex = index;
}
});
if (authorExists) {
authors[authorIndex].count++;
} else {
authors.push({
name: authorName,
image: authorImage,
count: 1,
about: authorAbout,
profileUrl: authorProfileUrl,
comment: 0,
});
}
}
});
authors.sort(function (a, b) {
return b.count - a.count;
});
$.each(authors, function (index, author) {
let html =
'<div class="flex bg-white dark:bg-gray-700 dark:text-gray-300 shadow rounded">' +
'<a href="' +
author.profileUrl +
'" target="_blank" class="author-image flex items-start px-3 py-3">' +
'<div class="w-20 h-20 rounded-full object-cover mr-4 shadow" style="background-image: url(' +
author.image +
'); background-repeat: no-repeat; background-position: center; background-size: cover;"></div>' +
'<div class="">' +
'<div class="flex items-center justify-between">' +
'<div class="text-md font-semibold text-gray-900 dark:text-gray-300 mt-3">' +
author.name +
"</div>" +
"</div>" +
'<div class="text-gray-700 dark:text-gray-400">Posts: ' +
author.count +
" </div>" +
'<div class="text-gray-700 dark:text-gray-400" id="' + author.name + '-comment">Comments: ' +
author.comment +
" </div>" +
"</div>" +
"</a>" +
"</div>";
$(".tbt_all_authors-list").append(html);
});
});
function displayCommentCount(data) {
if ("entry" in data.feed) {
totalCommentCount = data.feed.entry.length;
for (var i = 0; i < data.feed.entry.length; i++) {
var authorName = data.feed.entry[i].author[0].name.$t;
console.log(authors.filter((author) => author.name === authorName).length > 0);
if (authors.filter((author) => author.name === authorName).length > 0) {
authors.forEach((author) => {
if (author.name === authorName) author.comment++;
});
}
}
}
authors.forEach((author) => {
document.getElementById(`${author.name}-comment`).innerText = `Comments: ${author.comment}`;
});
}
function handleJsonpData(data) {
displayCommentCount(data);
}
var script = document.createElement("script");
script.src =
"https://tailwindbt.blogspot.com/feeds/comments/default?alt=json-in-script&max-results=10&callback=handleJsonpData";
document.body.appendChild(script);
</script>
<!-- 结束代码片段 -->
英文:
You somehow used sfwCommentCount
variable in html element that was out of that scope, that's why its not working
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-html -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/2.2.19/tailwind.min.css" rel="stylesheet" />
<script crossorigin="anonymous" src="https://kit.fontawesome.com/7dfc182d96.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<style>
.author-image {
cursor: pointer;
}
</style>
<div class="mb-0 mt-12">
<h4 class="mb-0 text-black dark:text-gray-300"><i class="fa-solid fa-user-vneck-hair"></i> Authors and Writers</h4>
</div>
<div
class="tbt_all_authors-list mt-0 mb-16 grid grid-cols-1 sm:grid-cols-1 md:grid-cols-3 lg:grid-cols-3 xl:grid-cols-3 gap-5"></div>
<script>
let feedURL = "https://tailwindbt.blogspot.com/feeds/posts/default?alt=json-in-script&callback=?&max-results=10";
let authors = [];
$.getJSON(feedURL, function (data) {
$.each(data.feed.entry, function (index, entry) {
if (entry.author) {
let authorName = entry.author[0].name.$t;
let authorImage = entry.author[0].gd$image.src;
let authorAbout = "";
if (entry.author[0].gd$about) {
authorAbout = entry.author[0].gd$about.$t;
}
let authorProfileUrl = entry.author[0].uri.$t; // Extract the author profile URL
let authorExists = false;
let authorIndex;
$.each(authors, function (index, author) {
if (author.name === authorName) {
authorExists = true;
authorIndex = index;
}
});
if (authorExists) {
authors[authorIndex].count++;
} else {
authors.push({
name: authorName,
image: authorImage,
count: 1,
about: authorAbout,
profileUrl: authorProfileUrl,
comment: 0,
});
}
}
});
authors.sort(function (a, b) {
return b.count - a.count;
});
$.each(authors, function (index, author) {
let html =
'<div class="flex bg-white dark:bg-gray-700 dark:text-gray-300 shadow rounded">' +
'<a href="' +
author.profileUrl +
'" target="_blank" class="author-image flex items-start px-3 py-3">' +
'<div class="w-20 h-20 rounded-full object-cover mr-4 shadow" style="background-image: url(' +
author.image +
'); background-repeat: no-repeat; background-position: center; background-size: cover;"></div>' +
'<div class="">' +
'<div class="flex items-center justify-between">' +
'<div class="text-md font-semibold text-gray-900 dark:text-gray-300 mt-3">' +
author.name +
"</div>" +
"</div>" +
'<div class="text-gray-700 dark:text-gray-400">Posts: ' +
author.count +
" </div>" +
`<div class="text-gray-700 dark:text-gray-400" id="${author.name}-comment">Comments: ` +
author.comment +
" </div>" +
"</div>" +
"</a>" +
"</div>";
$(".tbt_all_authors-list").append(html);
});
});
function displayCommentCount(data) {
if ("entry" in data.feed) {
totalCommentCount = data.feed.entry.length;
for (var i = 0; i < data.feed.entry.length; i++) {
var authorName = data.feed.entry[i].author[0].name.$t;
console.log(authors.filter((author) => author.name === authorName).length > 0);
if (authors.filter((author) => author.name === authorName).length > 0) {
authors.forEach((author) => {
if (author.name === authorName) author.comment++;
});
}
}
}
authors.forEach((author) => {
// $(`#${author.name}-comment`)[0].innerText =`Comments: ${author.comment}`;
document.getElementById(`${author.name}-comment`).innerText = `Comments: ${author.comment}`;
});
}
function handleJsonpData(data) {
displayCommentCount(data);
}
var script = document.createElement("script");
script.src =
"https://tailwindbt.blogspot.com/feeds/comments/default?alt=json-in-script&max-results=10&callback=handleJsonpData";
document.body.appendChild(script);
</script>
<!-- end snippet -->
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论