The enctype attribute of the form element

Reference: https://blog.csdn.net/djuyqnixvh/article/details/75453879
The enctype attribute of form is the encoding method. There are two commonly used types: application / x-www-form-urlencoded and multipart / form-data, the default application / x-www-form-urlencoded. When the action is get, the browser uses x-www-form-urlencoded encoding to convert the form data into a string (name1 = value1 & name2 = value2 ...), and then append this string to the url, separated by? , Load this new url. When the action is post, the browser encapsulates the form data into the http body and sends it to the server. If there is no type = file control, use the default application / x-www-form-urlencoded. But if type = file, then multipart / form-data is used. The browser will divide the entire form into units of controls, and add Content-Disposition (form-data or file), Content-Type (default is text / plain), name (control name) and other information for each part, and Plus the separator (boundary).

Guess you like

Origin www.cnblogs.com/21summer/p/12717773.html