11:34
0
Bài viết này mình chia sẻ với các bạn cách tạo hiển thị tổng số bài viết và comment trên blogspot. Tiện ích này có tác dụng làm cho người truy cập thấy được sự phong phú trong blog của bạn và kích thích sự tò mò của họ. Các bạn chỉ cần dán đoạn code phía dưới trong phần tiện ích HTML trong blogger. Bạn muốn đặt ở đâu thì copy đoạn code đặt ở vị phí đó. 

Demo:


Code:


<div style='float:left;padding:8px;'>
<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgv_nom-MAW76g4JWm4yJWdOaE-xNtMV8L6a3sVvJYRK2aQB3bYBBBmhMkJJgndThw9kXpSuUBjDDjZaKQXwo1JfNjDMUhyphenhyphenkfyjuc558DvbMq4XxEBxfsKaou1syiqsfQOvQsr2Wuw3VzaX/s1600/untitled.PNG" width="40" height="40" style="margin-right:8px;float:left;" />
<span style="float:left;margin-top:2px;padding:0;font-size:18px;color:#000;font-family:Arial,Helvetica,sans-serif;">Tổng số nhận xét:
<script style="text/javascript">
function showpostcount(json) {
document.write(parseInt(json.feed.openSearch$totalResults.$t,10));
}</script>
<script src="http://thegioiblogs.blogspot.com/feeds/comments/default?alt=json-in-script&callback=showpostcount"></script> </span><br /><!--[if IE]><br /><![endif]-->

<span style="text-align:left;margin:0px;padding:0px;font-size: 12px;color:#000;font-family:Arial, Helvetica, sans-serif;"></span>
</div><div style='clear:both;'/>

<div style='float:left;padding:8px;'>
<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiS_DmfAU1EKRQAdKcvU3t2TYrxJrVZ7znN8EGXwv9fLYMlVdPx2XJhj1dcMPW_KoI6-1ez9ONVuk-l81W42SsGsxKIsZUC1XqmH2ZA8t_uqo7DAMLCGTxnX9IyWQq5pW0BIVBgE9jghXkk/s1600/2.PNG" width="40" height="40" style="margin-right:8px;float:left;" />
<a href="
http://thegioiblogs.blogspot.com/" target="_blank"><span style="float:left;margin-top:2px;padding:0;font-size: 18px; color:#000;font-family:Arial,Helvetica,sans-serif;"> Tổng số bài viết:
<script src="http://thegioiblogs.blogspot.com/feeds/posts/default?alt=json-in-script&callback=showpostcount"></script> </span><br /><!--[if IE]><br /><![endif]--></a></div></div>



Các bạn thay link http://thegioiblogs.blogspot.com thành tên blog của bạn. Chúc thành công!



0 nhận xét:

Đăng nhận xét