Диалоговое окно на чистом javascript

Задача: вывести диалоговое окно без использования Jquery

Решение:

<style>
.DialogConfirm{
    position: fixed;
    width: 100%;
    height: 100%;
    background: rgba(96, 79, 79, 0.51);
    top: 0px;
    left: 0px;
    right: 0px;
    bottom: 0px;
}

.DialogConfirm>div{
  width: 90%;
  margin: 30% auto;
  padding: 10px 20px;
  background: #f7f7f7;
  border-style: solid;
  border-color: aliceblue;
  border-width: initial;
}

.DialogConfirm div p{
  text-align:center;
}

.DialogConfirm div button{
    width: 40%;
    margin: 0 5%;
    border-style: double;
    border-color: black;
}    
</style>    
<script>
function myConfirm(text,buttons=Array(), cb){
    var body = document.getElementsByTagName('body')[0];
    var overlay = document.createElement('div');
    overlay.className = 'DialogConfirm';
    var box = document.createElement('div');  
    var p = document.createElement('p');
    p.appendChild(document.createTextNode(text));
    box.appendChild(p);
    buttons.forEach(function(bt, index, array) {
        tmp_btn=document.createElement('button');
        tmp_btn.appendChild(document.createTextNode(bt));
        tmp_btn.addEventListener('click', function(){ cb(bt); body.removeChild(overlay); }, false);
        box.appendChild(tmp_btn);
    });
        
    overlay.appendChild(box)
    body.appendChild(overlay);    
}
myConfirm('Бахнем и весь мир в труху?',["Давай","Попозжа"], function(value){ console.log(value); });   
</script>    

Android studio: диалоговые окна с кнопкой Да и Нет

За построение диалоговых окон в Android отвечает класс AlertDialog. С помощью него довольно легко построить конструкцию, чтото типа:

 AlertDialog.Builder builder = new AlertDialog.Builder(cntcur);
                builder.setTitle("Вопрос!");
                builder.setMessage("Будем удалять фото?");
                builder.setCancelable(true);
                builder.setPositiveButton("ДА", new DialogInterface.OnClickListener() { // Кнопка Да
                    @Override
                    public void onClick(DialogInterface dialog, int which) {
                        dialog.dismiss(); // Отпускает диалоговое окно
                        map=arrayList.get(position);
                        Log.i("Info","--выбрали удалить");
                    }
                });
                builder.setNegativeButton("Конечно нет", new DialogInterface.OnClickListener() { // Кнопка Нет
                    @Override
                    public void onClick(DialogInterface dialog, int which) {
                        dialog.dismiss(); // Отпускает диалоговое окно
                    }
                });
                AlertDialog dialog = builder.create();
                dialog.show();

Диалоговое окно в 1С

Можно реализовать стандартным способом, что-то типа: