
<p id="progressBar"></p>

<script>

function wertyuifdfg(a){
    document.getElementById("progressBar").innerHTML = a;
}


var timeleft = 6;
var downloadTimer = setInterval(function(){
    timeleft = timeleft-1;
    if(timeleft >= 0)
    {
        wertyuifdfg(timeleft);
    }
}, 1000);
</script>


<!-- 
if(timeleft == 0){
    clearInterval(downloadTimer);
  }
  document.getElementById("progressBar").innerHTML = 10 - timeleft;
  timeleft += 1; -->