How to get the blogger first image URL in the post
问题 I want the URL of the FIrst image in the post and then use it as background image of a DIV 回答1: To get the URL of the first image in the post you can use the following data tag inside the Blogger template <data:blog.postImageUrl/> For setting it as the background , you would do something like <div class="newphoto" ></div> <script> document.getElementsByClassName('newphoto')[0].style.backgroundImage = "url('<data:blog.postImageUrl/>')" ; </script> or via jQuery $('.newphoto').css("background