0
我知道这是非常基本的,但我找不到答案。如何在一个条件内调用弹出窗口?例如:Popup.js - 调用弹出框
if(error.length != 0){
console.log(error);
popup({
content : '<p>Not allowed</p>',
type : 'html'
});
}
我的页面包含一个进口
<script src="<c:url value='/resources/js/jquery.popup.min.js' />"></script>
我得到一个错误:
Uncaught ReferenceError: popup is not defined
存在控制台没有错误,但一个弹出窗口不会出现 – thinker
然后检查脚本网址。我的意思是你说它是正确的? – ab29007
代码没有显示错误,也许是因为浏览器。试试这个:能够在你的浏览器中禁用“阻止弹出窗口”。也可以尝试不同浏览器中的代码。 – ab29007