Javascript examples for DOM HTML Element:Input Reset
Input Reset value Property - Get the text displayed on a Reset button:
<!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>