mui---在关闭webview之前给出提示

//重写后退按纽
                mui.back = function() {
                    mui.confirm('真的要走吗?', '警示', ['确定', '取消'], function(e) {
                        if(e.index == 0) {
                            var self = plus.webview.currentWebview();
                            //plus.webview.close(self);//方法一
                            self.close();//方法二
                        } else {
                            mui.toast('谢谢留下!');
                        }
                    });
                }
原文地址:https://www.cnblogs.com/beast-king/p/9119125.html