Input Reset value Property - Get the text displayed on a Reset button: - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Input Reset

Description

Input Reset value Property - Get the text displayed on a Reset button:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<input type="reset" id="myReset" value="Reset form">

<button onclick="myFunction()">Test</button>

<script>
function myFunction() {/* www  .  ja  v  a2 s .c  o  m*/
    var v = document.getElementById("myReset").value;
    console.log(v);
}
</script>

</body>
</html>

Related Tutorials