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