I was trying to get pc's time with javascript and pass it into an html form. This is my code:

this is my javascript:

```
<script>
var today = new Date();
var dd = today.getDate();
var mm = today.getMonth()+1; 
var yyyy = today.getFullYear();
today = today.getHours() + ":" + today.getMinutes()+":" + today.getSeconds();
document.getElementById('date').value = today;
</script>

```

and this is my html form:

```
<form method="POST" action="next_apply.php">                                                                        
  <input id="date" name="date">                                                                                                                                                                 
</form>

```

when I running the above code in jsfiddle seems to work. When I run it my pc (using XAMP) it is not working. Any idea what the problem might be here? 
This is my jsfiddle: <http://jsfiddle.net/deLkZ/1/>