I want to Simulate a button click via JavaScript using a button's value, not its id.
Here is the code using the button id
<input type="checkbox" onClick="document.getElementById('theSubmitButton').click();">Check the box to simulate a button click
<br>
<input type="button" name="theSubmitButton" id="theSubmitButton" value="Button" onClick="alert('The button was clicked.');">
I've tried getElementByValue('Button') but it didn't work.