【发布时间】:2020-08-05 12:05:26
【问题描述】:
如何在 Bootstrap 中设置window.alert 的样式?
代码示例:
something
.then(res => res.json())
.then(
result => {
console.log(result);
window.alert(result.description);
window.location.reload();
},
error => {
console.log(error);
window.alert(result.description);
window.location.reload();
}
);
【问题讨论】:
-
浏览器警告对话框无法设置样式。这是从不使用它的原因之一。使用模式对话框来显示您的警报和样式。
标签: javascript css reactjs bootstrap-4