Вопрос

How to get rid of web browser default prompt? My coffescript below. enter image description here

$(window).on 'beforeunload', (e) ->
    e.preventDefault()
    question = "<h4 class='text-center'>The actual changes for black/white list will be lost.</h4>"
    bootbox.confirm question, (result) ->
        if result
            $.post url, () ->
                window.location.reload()
Это было полезно?

Решение

You cannot replace the inbuilt message boxes. All you can do is use a plugin (or write your own logic) which replaces their functionality with HTML elements which can be styled.

This will mean changing your javascript code where alert, confirm etc are used.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top