Machine-translated by Google. Questions are authored in English.
Top

Discussion

Most of recent browsers support an additional ENCTYPE of multipart/form-data, which statements out of the following correctly define it ?

(i) This encoding transmit each field as a separate part of MIME compatible document automatically
(ii) MIME compatible document automatically use POST to submit data in multipart
(iii) This attribute specifies the way in which data is enclosed
(iv) This encoding sometime makes it easier for server side program to handle complex data.

  • A.(i) and (ii)
  • B.(ii) and (iv)
  • C.(iii) and (iv)
  • D.(i), (ii) and (iv)

Answer: D

The key is (i), (ii) and (iv).

With ENCTYPE set to multipart/form-data, the browser sends the form as a MIME multipart message in which each field is its own part (i). The form must use the POST method for this encoding, which is the point of (ii). It is useful for complex data such as file uploads, where the parts are easier for a server-side program to separate (iv).

Statement (iii) describes the ENCTYPE attribute in general, saying how the data is enclosed, rather than defining the multipart encoding itself, which is why the key leaves it out. That is a fine distinction, and (iii) is not false in itself. Options A, B and C each omit (i), (ii) or (iv), so D is the only option holding all three.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.