<!DOCTYPE html>
<html>
<body>

Name: <input type="text" id="myText" value="Mickey">

<p>Click the button to display the default value of the text field.</p>

<button type="button" onclick="myFunction()">Try it</button>

<p id="demo"></p>

<script>
function myFunction() {
    var x = document.getElementById("myText").defaultValue;
    document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>