modal.confirm in salesforce?


if ((Modal.confirm && Modal.confirm('some text here')) || (!Modal.confirm && window.confirm('same text here'))) navigateToUrl('some link here','DETAIL','submit');

我在按钮的on Click条件下具有上述代码。只是想知道"模态"一词是什么意思?另外,在弹出窗口中单击"确定"如何导航我到该链接,因为在上面的情况下没有提及"确定"?

谢谢sam

window.confirm()是基本(确定,取消)警报,如果要捕获"确定"按钮,则必须执行以下操作:

var result = window.confirm('You sure ?');
    if (result) {
        // Ok case
    } else {
        // Cancel case  
}

https://developer.mozilla.org/en-us/docs/web/api/window.confirm

最新更新