var news_date_div = '003_20170406_local_Joss House Bay_2.JPG'; var news_title_div = '003_20170406_local_Joss%20House%20Bay_2_58e5aee6298f5'; $(document).ready(function() { document.getElementById("news_date").innerHTML=decodeURIComponent(news_date_div); document.getElementById("news_title").innerHTML=decodeURIComponent(news_title_div); //alert(''); //alert(news_date_div); })