var container = document.getElementById("gpViewCount"); if(container){ container.innerHTML = "244"; }else{ document.write("244"); }