【发布时间】:2016-01-22 09:35:41
【问题描述】:
我希望“离开页面将导致数据丢失”的消息加粗。你能帮帮我吗?
$(window).bind("beforeunload", function(e) {
return "Leaving page will cause loss of data";
}).unload(function() {
// what if they choose 'leave this page';
});
【问题讨论】:
-
显示的消息框由浏览器/操作系统控制,其级别低于 JS 可以访问的级别。你不能改变它。
标签: javascript jquery html css internet-explorer