html form enctype

<!-method默认一般为"get",target默认为"self"-->
<form action="form_action.asp" enctype="text/plain">
  <p>First name: <input type="text" name="fname"  /></p>
 <!-input的"/"可要可不要,在xhtml里是要的-->
  <p>Last name: <textarea name="lname"  ></textarea></p>
 <!-textarea一定要有闭合标签,否则后面的全作为它的值-->
  <input type="submit" value="Submit" />
</form>

application/x-www-form-urlencoded     在发送前编码所有字符(默认)(可fiddler webforms查看,get请求中的字符也是可以方便查看)


 
multipart/form-data     不对字符编码。在使用包含文件上传控件的表单时,必须使用该值。nodejs data事件不会因为使用此编码而被触发多次,触发次数应该只与请求体大小有关(红框住的都是值)
 
text/plain     空格转换为 "+" 加号,但不对特殊字符编码。
 



posted @ 2012-11-06 21:32  wuhao12  阅读(622)  评论(0编辑  收藏  举报