<form> 标签的 enctype 属性

    值	                        描述
application/x-www-form-urlencoded	在发送前编码所有字符(默认)
multipart/form-data	         不对字符编码。在使用包含文件上传控件的表单时,必须使用该值。

text/plain	              空格转换为 "+" 加号,但不对特殊字符编码。  

 
做文件/图片上传要注意
   <form action="http://**.*8.com"  method="post" enctype='multipart/form-data'>
        <input type="file" name="file">
        <input type="hidden" name="appid" value="1001167">
        <input type="hidden" name="sign" value="ddd" id='sign'>
        <input type="hidden" name="dstPath" value="mathajx/test.jpg" id='dstPath'>
        <input type="submit" id="button" value="提交">
    </form>

  

猜你喜欢

转载自www.cnblogs.com/yiyi17/p/9088659.html
今日推荐