如何取消提醒讯息?
问题描述:
根据以下关于警报问题的建议,我在我的Web应用程序中添加了自定义警报。它在iOS7设备中工作正常,但在iOS8设备上,它以粗体显示消息。如何取消提醒讯息?
是否可以在没有BOLD的情况下显示消息字体?
请查看附件截图供您参考。
Change JavaScript alert dialog title in iOS
代码片段:
function alert2(words){
var iframe = document.createElement("IFRAME");
iframe.setAttribute("src", 'data:text/plain,');
document.documentElement.appendChild(iframe);
window.frames[0].window.alert(words);
iframe.parentNode.removeChild(iframe);
}
function takePicture() {
alert2("Testing custom alert");
}
答
不,你不能将它的操作系统或浏览器相关的但你可以使自己的弹出框,这也是很容易
你只是调用'alert(...)'?添加了 – 2014-10-06 20:53:25
代码片段。如果我只使用alert(“Test”),那么标题将以粗体显示,并且消息在iOS8中显示正常。我不希望标题显示在屏幕上 – 2014-10-06 21:01:36
Marc B,有什么想法? – 2014-10-07 19:57:30