H5 页面标签的使用

1.录音功能

<input type="file" id="ids" accept="audio/*" capture="microphone" @change="preview($event)"/>

2.相机和相册

<input type="file" id="file" multiple> 

var file = $("#file");
        if (getIos()) {
            file.removeAttribute("capture");
        }
        function getIos() {
            var ua=navigator.userAgent.toLowerCase();
            if (ua.match(/iPhone\sOS/i) == "iphone os") {
                return true;
            } else {
                return false;
            }
        }

猜你喜欢

转载自www.cnblogs.com/ComputerVip/p/11796930.html