Javascript 如何在引导中设置window.alert的样式
如何在引导中设置Javascript 如何在引导中设置window.alert的样式,javascript,css,reactjs,bootstrap-4,Javascript,Css,Reactjs,Bootstrap 4,如何在引导中设置窗口.警报的样式 代码示例: something .then(res => res.json()) .then( result => { console.log(result); window.alert(result.description); window.location.reload(); }, error => {
窗口.警报的样式
代码示例:
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();
}
);
您不能设置窗口的样式警报
,您可以使用引导模式
而不是警报
更多信息请访问:这些更改窗口的样式由浏览器定义。
您必须编写自己的浏览器:D
另一种选择可能是祝酒信息。无法设置浏览器警报对话框的样式。这是不使用它的原因之一。使用模式对话框显示警报,并设置相应的样式。