Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<body>
Name: <input type="text" id="milli" >
<button onclick="myFunction()">Try it</button>
<script>
function myFunction() {
var milliseconds= document.getElementById("milli").value; 
alert(milliseconds);
var time = milliseconds;
var date = new Date(time);
alert(date.toString()); // Wed Jan 12 2011 12:42:46 GMT-0800 (PST)
}
</script>
</body>
</html>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
viru48pro
0viewers