var t = "10:10:00"; var a = t.split(":"); var h = parseInt(a[0], 10); var m = parseInt(a[1], 10); var s = parseInt(a[2], 10); alert(h + "h, " + m + "m, " + s + "s")