Javascript 浏览器警报弹出窗口未显示在IE中的当前窗口上
警报弹出窗口未显示在其他浏览器上显示的当前窗口上(相同的警报弹出窗口)。 这个bug只出现在IE上,在chrome和Mozilla上运行良好Javascript 浏览器警报弹出窗口未显示在IE中的当前窗口上,javascript,jquery,html,Javascript,Jquery,Html,警报弹出窗口未显示在其他浏览器上显示的当前窗口上(相同的警报弹出窗口)。 这个bug只出现在IE上,在chrome和Mozilla上运行良好 if (iNum > 99) { document.getElementById(id).value = ''; alert('value not be greater than'); //this alert popup open in another broswer in IE
if (iNum > 99) {
document.getElementById(id).value = '';
alert('value not be greater than'); //this alert popup open in another broswer in IE
return false;
}
window.alert()
,可能(尽管不太可能)另一个alert()
与window的冲突console.log(警报)代码>并查看它所显示的内容。应该是这样的:
function alert() {
[native code]
}
*您可以尝试通过设置->兼容性视图设置打开兼容性视图,并在其中添加您的网站url *或者,您可以打开兼容性视图,将此meta标记放在页面的head标记中,如下所示
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">
<head>
您可以参考了解兼容性模式。您正在使用的IE版本是什么?IE版本11.0@SachinthaNayanajithDid您尝试添加兼容性视图-@SiddharthVyas?@SachinthaNayanajith抱歉,我不明白,请您进一步了解我添加了答案。你可以试试@悉达多