Javascript examples for DOM HTML Element:Input Submit
Input Submit value Property - Return the text displayed on a Submit button:
<!DOCTYPE html> <html> <body> <input type="submit" id="mySubmit" value="Submit form"> <button onclick="myFunction()">Test</button> <script> function myFunction() {// w ww . j a v a2 s . c o m var v = document.getElementById("mySubmit").value; console.log(v); } </script> </body> </html>