If you truly insist to have a bold text on this dialog, you can try UTF-8 fonts
function test(){
var msg = "Please click to proceed, to exit..";
if(confirm(msg)) {
alert("clicked ");
}
}
However it is not recommended to use JavaScript confirm dialog when interacting with a real user.
See this link for more info https://developer.mozilla.org/en-US/docs/Web/API/window.alert
A preferred method to go is to use Jquery UI confirm dialog (or your favorite plugin)
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Dialog - Modal confirmation</title>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css">
<script src="http://code.jquery.com/jquery-1.10.2.js"></script>
<script src="http://code.jquery.com/ui/1.11.2/jquery-ui.js"></script>
<style>
body {
font-family: "Trebuchet MS", "Helvetica", "Arial", "Verdana", "sans-serif";
font-size: 62.5%;
}
</style>
<script>
$(function() {
$( "#dialog-confirm" ).dialog({
resizable: false,
height:140,
modal: true,
buttons: {
"Delete all items": function() {
alert('All items deleted');
$( this ).dialog( "close" );
},
Cancel: function() {
alert('All items remained')
$( this ).dialog( "close" );
}
}
});
});
</script>
</head>
<body>
<div id="dialog-confirm" title="Empty the recycle bin?">
<p>
<span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span>
These items will be <b>permanently deleted</b> and cannot be recovered. Are you sure?
</p>
</div>
</body>
</html>