This is not possible to change confirm box the title in JavaScript, from a security and anti-phishing point. The only way you could simulate it is by creating a modeless dialog window.
JavaScript confirm title
Simple example code to the default title of confirm(). There are many third-party JavaScript plugins that you could use to fake this effect so you do not have to write all that code.
<!DOCTYPE html>
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<link href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css" rel="stylesheet" />
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
</head>
<body>
<script>
ConfirmDialog('Are you sure');
function ConfirmDialog(message) {
$('<div></div>').appendTo('body')
.html('<div><h6>' + message + '?</h6></div>')
.dialog({
modal: true,
title: 'Delete message Confirm',
zIndex: 10000,
autoOpen: true,
width: 'auto',
resizable: false,
buttons: {
Yes: function() {
// $(obj).removeAttr('onclick');
// $(obj).parents('.Parent').remove();
$('body').append('<h3>Confirm Dialog Result: <i>Yes</i></h3>');
$(this).dialog("close");
},
No: function() {
$('body').append('<h3>Confirm Dialog Result: <i>No</i></h3>');
$(this).dialog("close");
}
},
close: function(event, ui) {
$(this).remove();
}
});
};
</script>
</body>
</html>
Output:

Do comment if you have any doubts or suggestions on this Js confirm box topic.
Note: The All JS Examples codes are tested on the Firefox browser and the Chrome browser.
OS: Windows 10
Code: HTML 5 Version

Degree in Computer Science and Engineer: App Developer and has multiple Programming languages experience. Enthusiasm for technology & like learning technical.