JavaScript confirm not working in Chrome

前端 未结 1 1075
感情败类
感情败类 2020-12-19 17:25

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         


        
相关标签:
1条回答
  • 2020-12-19 18:08

    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.

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

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

    0 讨论(0)
提交回复
热议问题