解决办法,使用七牛视频格式转换

article image
article image

七牛 设置转码样式
七牛 普通音视频转码(avthumb)

h5点播播放mp4视频遇到的坑,ios的h5不能播放视频等
处理.mp4的视频在电脑浏览器、安卓手机可以正常播放,ios设备无法播放的问题
七牛云上传的视频无法播放
解决部分mp4视频在ios上无法播放问题

IOS移动端(H5)alert/confirm提示信息去除网址(URL)
最近移动端项目用alert和confirm进行信息提示,但发现在IOS系统中,每次提示信息上面都会被添加一行URL地址。

那么如何去掉地址提示呢,经查找和实现发现进行重写alert和confirm方法可解决此问题。

重写alert方法:

GDScript3
8 行
window.alert = function(name){
        var iframe = document.createElement("IFRAME");
        iframe.style.display="none";
        iframe.setAttribute("src", 'data:text/plain,');
        document.documentElement.appendChild(iframe);
        window.frames[0].window.alert(name);
        iframe.parentNode.removeChild(iframe);
    };

重写confirm方法:

GDScript3
10 行
window.confirm = function (message) {
            var iframe = document.createElement("IFRAME");
            iframe.style.display = "none";
            iframe.setAttribute("src", 'data:text/plain,');
            document.documentElement.appendChild(iframe);
            var alertFrame = window.frames[0];
            var result = alertFrame.window.confirm(message);
            iframe.parentNode.removeChild(iframe);
            return result;
    };

其中confirm方法要return子框架的结果。否则默认都是“取消”的效果。

a href="tel" 拨打电话

代码片段
1 行
<a href="tel:10086">10086</a>