There is a string value in a p class like <p id="demo">10 hours : 25 minutes : 20 seconds</p>. Here I want to split that value like 10:25:20. This is my javascript function.
function countdownTimeStart(){
var countDownDate = new Date("Mar 5, 2018 15:37:25").getTime();
var x = setInterval(function() {
something ...
}
So I need to replace the var countDownDate = new Date("Sep 5, 2018 15:37:25").getTime(); into above 10:25:20 which comes from p tag. I'm tried following way.
var countDownDate = document.getElementById("demo").value;
But it does not work. Can anyone help me to solve this.