JavaScript确认无法在Chrome中使用 [英] JavaScript confirm not working in Chrome

查看:129
本文介绍了JavaScript确认无法在Chrome中使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下是我目前正在处理的旧版应用程序中使用的代码段。

Below is a code snippet used in the legacy application I am currently working on.

var x=confirm("Some Text");
if(x)
 //Call method A
else 
// Call method B

它在几天前工作正常,但现在它在Chrome中不起作用,但在IE中仍然很好。

It was working fine till some days ago, but now it is not working in Chrome, but still good in IE.

它与浏览器更新有什么关系?

Would it be something to do with the browser update?

推荐答案

删除安装到Chrome的所有广告拦截器扩展程序,然后重试。有时在具有大量用户群的应用程序上,少数用户可能会将弹出标记为广告。这将反过来阻止安装了该扩展的所有用户的弹出/确认/对话/警报。

Remove any ad blocker extension installed to your chrome and try again. Sometimes on applications which have large user base, a few users may mark pop up as ads. This will in turn block pop up/Confirm/Dialogue/Alert for all users who have that extension installed.

我曾经遇到过这个问题。 Ad Block 扩展程序在我的网站上列出黑名单警告。

I had this problem once. Ad Block extension blacklisted alerts in my website.

注意:删除扩展程序后,请关闭所有Chrome实例。需要完全重启chrome

NOTE: After removing extension, please close all instance of chrome. Requires a complete restart of chrome

这篇关于JavaScript确认无法在Chrome中使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆