H5判断是iOS还是android

iOS跳转到app store的应用详情页
android直接下载apk

function download() {
        var system = isIosOrAndroid()
        if (system == 1) {
            // 安卓
            var src = 'http://imtt.dd.qq.com/16891/26747DD8B125A8479AD0C9D22CA47BC9.apk?fsname=com.snda.wifilocating_4.2.91_3211.apk&csr=1bbd';
            var iframe = document.createElement('iframe');
            iframe.style.display = 'none';
            iframe.src = "javascript: '
                    
                    

你可能感兴趣的:(H5判断是iOS还是android)