Input Submit value Property - Return the text displayed on a Submit button: - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Input Submit

Description

Input Submit value Property - Return the text displayed on a Submit button:

Demo Code

ResultView the demo in separate window

<!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>

Related Tutorials