你好,我有一个使用 sweetalert 的代码
swal("Good job!", "You clicked the button!", "success")
此代码会弹出一条消息并有一个按钮 okay,我喜欢做的是在单击 okay 按钮后刷新页面。
我可以这样做吗?
最佳答案
你可以试试这个,它对我有用。
swal({
title: "Good job",
text: "You clicked the button!",
type: "success"
},
function(){
location.reload();
}
);
关于php - 如何使用 sweetalert 单击确定后重新加载页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36300919/