我已经看过了这里的例子,但找不到解决方案?我正在做的事情是,我从开发人员网站上获取了代码,并只在它说我可以的地方添加了我的代码。它可以加载到除IE之外的所有浏览器上。请指教,因为这让我头疼。我在chrome和firefox上执行了错误代码,但它加载了。
错误代码是:未捕获(在承诺中)取消
我的代码用javascript编写,同时检查会话是否处于活动状态
<script>
if (!<?php echo isset($_SESSION['user_id'])?'true':'false'; ?>) {
swal({
title: "So its your first job request?",
text: "If you are new here, click CONTINUE to enter your personal details then your job details or click LOGIN",
type: "info",
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'No, LOGIN!',
cancelButtonText: 'CONTINUE'
}).then(function () {
window.location.replace("login");
})
$('#progress').show();
$('#your-details').show();
$('#status-register').show();
$('#start2').show();
} else {
$('#your-details').hide();
$('#status-pickup').show();
$('#progress').show();
$('#pickup-details').show();
$('#start1').show();
}
$('#bottom-stuff').show();
</script>任何帮助都能帮我解脱,谢谢
发布于 2017-05-30 21:35:51
要解决此问题,只需添加以下内容
<script src="https://cdnjs.cloudflare.com/ajax/libs/core-js/2.4.1/core.js"></script>https://stackoverflow.com/questions/44250992
复制相似问题