I have a an input button that is produced by a php for loop.
here is what it outputs:
<input type="submit" name="submit" id="submit" value="Submit">
<input type="submit" name="submit" id="submit" value="Submit">
<input type="submit" name="submit" id="submit" value="Submit">
<input type="submit" name="submit" id="submit" value="Submit">
<input type="submit" name="submit" id="submit" value="Submit">
<input type="submit" name="submit" id="submit" value="Submit">
<input type="submit" name="submit" id="submit" value="Submit">
<input type="submit" name="submit" id="submit" value="Submit">
how can i change the value of all the input's with the id or name "submit"?
i tried getElementById
but that only changes of the inputs:
<script>
var submit_button = document.getElementById('submit');
submit_button.value = 'Next';
</script>
i tried getElementsByName
but that didnt work at all:
<script>
var submit_button = document.getElementsByName('submit');
submit_button.value = 'Next';
</script>
How can i change the value of all the input
's?
i want regular javascript. if not possible with regular javascript, jquery is fine too.