笔记——ios识别不了new Date的“-”

笔记——ios识别不了new Date的“-”,第1张

var u = navigator.userAgent;

var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端

if (isiOS) {

start_time = =start_time.replace(/-/g, '/');

}

ios的alert显示url:

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);

};

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/993862.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-21
下一篇 2022-05-21

发表评论

登录后才能评论

评论列表(0条)

保存