记录一下最近在写移动端的项目,经常会遇到一些兼容问题,比如现在遇到的alert提示消息的时候出现的url地址的问题,找到的解决方法如下
window.alert = function(name){//解决苹果手机使用alert提示显示url地址的问题
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);
};
我是在网上看到的大佬的文章,奉上大佬原文地址:https://www.sunzhongwei.com/how-to-get-input-value-in-vuejs