我有一个简单的PHP表单,在表单提交时我想显示甜蜜的警报,我做了以下代码:
";
echo "swal({
title: 'Your Message Was Sent Successfully',
type: 'success',
confirmButtonColor: '#DD6B55',
confirmButtonText: 'CLOSE',
}).then(() => {
if (result.value) {
// handle Confirm button click
} else {
// result.dismiss can be 'cancel', 'overlay', 'esc' or 'timer'
}
});";
echo "";
}
?>
然而sweetalert在表单提交后没有出现,谁能告诉我这里出了什么问题,提前谢谢
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号