Home > Backend Development > PHP Tutorial > 文件上传输入框的value值有没有意思

文件上传输入框的value值有没有意思

WBOY
Release: 2016-06-13 12:06:05
Original
953 people have browsed it

文件上传输入框的value值有没有意义?
" />  
这里的value值有意义吗?POST提交表单时能获取到它的值吗?
------解决方案--------------------
设定初始值没有用,但如果是选择了文件的,那就能用$_POST获取到value的内容。
------解决方案--------------------
没有意义,因为 input type="file" 是只读的

------解决方案--------------------
如果只是想在提交的时候获取它的值,可以改用hidden隐藏标签
------解决方案--------------------
value可以用来js判断是否上传图片,还是有点用的,

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template