var mycountvalue ="162"; $(window).load(function() { document.getElementById("mycount").innerHTML = " "+ mycountvalue; });