当提交HTML表单而不指定方法时,默认的HTTP方法是什么?GET还是POST?
在HTML标准之间这种行为是否发生过变化?
请尽可能引用W3C标准文档。
是GET。
看一下W3C取代的建议书17.3FORM元素。
摘抄:
<!ATTLIST FORM %attrs; -- %coreattrs, %i18n, %events -- action %URI; #REQUIRED -- server-side form handler -- method (GET|POST) GET -- HTTP method used to submit the form-- enctype %ContentType; "application/x-www-form-urlencoded" accept %ContentTypes; #IMPLIED -- list of MIME types for file upload -- name CDATA #IMPLIED -- name of form for scripting -- onsubmit %Script; #IMPLIED -- the form was submitted -- onreset %Script; #IMPLIED -- the form was reset -- accept-charset %Charsets; #IMPLIED -- list of supported charsets -- >
好读
HTML表单中的GET和POST方法-有什么区别?