<button id = "deleted" type="submit" class="btn btn-danger">Удалить статью</button>
</form>
<script>
let button = document.querySelector("#deleted");
button.addEventListener("click", function() {
confirm('Yes');
});
</script>