var scr = document.createElement('script'); scr.src = "https://srrpnj.tumblr.com/api/read/json? callback=embedFeaturedTumblrPosts.embedPosts& rand=" + Math.randInt(100000, 999999); document.getElementById("some_div_id_name") .appendChild(scr);