简体   繁体   English

将javascript确认对话框更改为引导

[英]Changing javascript confirm dialog box to bootstrap

I already this something 我已经这东西了

Here is the original code: 这是原始代码:

<script type='text/javascript'>
function delete_user( id ){

    var answer = confirm('Are you sure?');

    //if user clicked ok
    if ( answer ){
        //redirect to url with action as delete and id to the record to be deleted
        window.location = 'delete.php?id=' + id;
    }
}
</script>

How do I remove the old javascript confirm dialog box and replace it with bootstrap? 如何删除旧的JavaScript确认对话框,然后将其替换为引导程序?

The method 'confirm', which shows a modal confirmation dialog box, is associated with the XPInstall API that was used by Mozilla Firefox. 方法“ confirm”(显示模式确认对话框)与Mozilla Firefox使用的XPInstall API关联。 This method has been deprecated since Gecko 1.9 and most likely will not be configurable by bootstrap. 自Gecko 1.9起不推荐使用此方法,并且很可能无法通过引导程序配置。 References can be seen at: https://developer.mozilla.org/en-US/docs/Archive/Mozilla/XPInstall/Reference/Install_Object/Methods/confirm and https://developer.mozilla.org/en-US/docs/Archive/Mozilla/XPInstall 可以在以下位置找到参考: https : //developer.mozilla.org/en-US/docs/Archive/Mozilla/XPInstall/Reference/Install_Object/Methods/confirmhttps://developer.mozilla.org/en-US/ docs / Archive / Mozilla / XPInstall

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM