How to change button value?
-
I am attempting to change the text on the submit button in my HTML form. I have tried the following variations of code (as well as several others) and none of them will change the value away from the default (“submit” on Chrome and “submit query” on FF & IE).
<button onclick=”myFunction()” name=”submit” type=”submit” value=”Submit Form” />Submit</button>
—This removed the yellow background from my button on Chrome, but didn’t change the result in FF & IE.<button onclick=”myFunction()”><input type=”submit” />Submit</button>
—Default value with yellow background<button onclick=”myFunction()”><input type=”submit” value=”submit”/>Submit</button>
—Default value with yellow background<button onclick=”myFunction()” value=”submit”><input type=”submit” value=”submit”/>Submit</button>
—Default value with yellow backgroundAny help would be appreciated.
- The topic ‘How to change button value?’ is closed to new replies.