V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
sdjl
V2EX  ›  问与答

请问,<input type=file> 标签在 iPhone 下如何直接进入相册,而不是让用户选择拍照或相册?

  •  
  •   sdjl · 2014-03-26 12:17:52 +08:00 · 8827 次点击
    这是一个创建于 3691 天前的主题,其中的信息可能已经有所发展或是发生改变。
    4 条回复    1970-01-01 08:00:00 +08:00
    ETiV
        1
    ETiV  
       2014-03-26 13:16:49 +08:00   ❤️ 1
    因为感觉挺有意思的, 所以搜索了一下~

    答案是: 貌似暂时不行.

    这个页面
    http://dev.opera.com/articles/view/media-capture-in-mobile-browsers/

    有这样一段:

    Here are some considerations, which I would hope to see changed in the future:

    * First of all, I would expect different default labels from Choose File and No file chosen, and the possibility to customize them.

    ------
    同时搜到了一个检查移动浏览器HTML5支持情况的页面:
    http://mobilehtml5.org/
    sdjl
        2
    sdjl  
    OP
       2014-03-26 14:54:47 +08:00
    explon
        3
    explon  
       2014-03-26 16:20:27 +08:00
    增加多选属性直接进相册,单选模式弹出提示,这样子的。
    flyingkid
        4
    flyingkid  
       2014-03-26 16:32:24 +08:00
    $(".faceIco").on("click",function(){
    if($(".checks").length <= 0){
    $('<input type="file" class="checks" value="上传图片" multiple accept="image/*" style="position:absolute;left:-2000px;z-index:-20" />').appendTo("body");
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1989 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 01:28 · PVG 09:28 · LAX 18:28 · JFK 21:28
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.