Horje

How to add HTML <button> formenctype multipart/form-data Attribute

multipart/form-data  This value is necessary if the user will upload a file through the form
index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<h1>The button formenctype attribute</h1>

<form action="/action_page_binary.asp" method="post">
  <label for="fname">First name:</label>
  <input type="text" id="fname" name="fname" value="Ståle"><br><br>
  <button type="submit">Submit with character encoding</button>
  <button type="submit" formenctype="multipart/form-data">Submit without character encoding</button>
</form>

</body>
</html>

Output should be:

How to add HTML <button> formenctype multipart/form-data Attribute




Type:
html
Category:
Web Tutorial
Sub Category:
HTML Tag
Uploaded by:
Admin