在iOS6下开发webapp,使用inputz之file,很有用
<input type="file" accept="image/*" capture="camera"><input type="file" accept="video/*" capture="camcorder"><input type="file" accept="audio/*" capture="microphone"> |
capture表示,可以捕获到系统默认的设备,比如:camera--照相机;camcorder--摄像机;microphone--录音。
accept表示,直接打开系统文件目录。
其实html5的input:file标签还支持一个multiple属性,表示可以支持多选,如:
<input type="file" accept="image/*" multiple> |
加上这个multiple后,capture就没啥用了,因为multiple是专门yong用来支持多选的。
本文介绍了如何在iOS6环境下利用HTML5的input:file标签来开发web应用,通过设置capture和accept属性实现相机拍摄、视频录制及音频录制功能,并讨论了multiple属性对capture属性的影响。
1662

被折叠的 条评论
为什么被折叠?



