读书人

input type=file的施用

发布时间: 2012-11-09 10:18:48 作者: rapoo

input type=file的使用

来自于:http://www.hbcms.com/main/dhtml/objects/input_file.html

要使得文件上载能够成功:

INPUT type=file 元素必须出现在 FORM 元素内。必须为 INPUT type=file 元素指定 NAME 标签属性的值。FORM 元素 method 标签属性的值必须设置为 post。FORM 元素 enctype 标签属性的值必须设置为 multipart/form-data(在rails中写法为:html => {:multipart => true})

http://old.family168.com/tutorial/ruby/html/ruby-ch-13.html

Rails上传文件

读书人网 >Web前端

热点推荐