What I'm trying to do is get 5888 to look like 5,888 when my html is run any help would be appreciated. So after you run this in html I want the countdown of "xxxx hours unitl xmas". What the question is I want the "xxxx" to be as "x,xxx".
<html>
<body>
<p>Clock!</p>
<div id = "string"></div>
<div id = "string2"></div>
<script>
var myVar=setInterval(function(){myTimer()},1000);
function myTimer()
{
var d=new Date();
var n=d.toLocaleDateString();
var t=d.toLocaleTimeString();
var m = d.toTimeString();
document.getElementById("string").innerHTML= n + m;
var b = new Date();
b.setFullYear(2014,11,25);
var dateHour1 = b.getTime();
var minutes=1000*60;
var hours=minutes*60;
var xHour = Math.round((dateHour1 - d)/hours);
document.getElementById("string2").innerHTML = xHour +" Hours until xmas";
}
</script>
</body>
</html>