Change text from "Submit" on input tag
The value
attribute on submit
-type <input>
elements controls the text displayed.
<input type="submit" class="like" value="Like" />
The value
attribute is used to determine the rendered label of a submit input.
<input type="submit" class="like" value="Like" />
Note that if the control is successful (this one won't be as it has no name
) this will also be the submitted value for it.
To have a different submitted value and label you need to use a button element, in which the textNode inside the element determines the label. You can include other elements (including <img>
here).
<button type="submit" class="like" name="foo" value="bar">Like</button>
Note that support for <button>
is dodgy in older versions of Internet Explorer.