HTML CSS examples for HTML Tag:button
The formenctype attribute sets how form-data should be encoded before sending it to a server. This attribute overrides the form's enctype attribute.
The formenctype attribute is only used for buttons with type="submit".
Value | Description |
---|---|
application/x-www-form-urlencoded | Default. All characters will be encoded before sent |
multipart/form-data | No characters are encoded (for file upload control) |
text/plain | Spaces are converted to "+" symbols, but no characters are encoded |
A form with two submit buttons. The first submit button submits the form data with default character encoding, and the second submits the form data without character encoding:
<!DOCTYPE html> <html> <body> <form action="/action_page_binary.asp" method="post"> Name: <input type="text" name="fname" value="St?le Refsnes"><br> <button type="submit">Submit with character encoding</button> <button type="submit" formenctype="text/plain">Submit without character encoding</button> </form><!--from w w w . ja v a 2 s . c om--> </body> </html>