jfinal与bootstrap的登出实战详解(2)
6.弹出weebox确认框
$.showConfirm = function(str, funcok, funcclose) {
var okfunc = function() {
$.weeboxs.close("yunm_confirm_box");
funcok.call();
};
$.weeboxs.open(str, {
boxid : 'yunm_confirm_box',
contentType : 'text',
showButton : true,
showCancel : true,
showOk : true,
title : '确认',
width : 280,
type : 'wee',
onopen : function() {
init_ui_button();
},
onclose : funcclose,
onok : okfunc
});
};
function init_ui_button() {
$("button.ui-button[init!='init']").each(function(i, o) {
$(o).attr("init", "init"); // 为了防止重复初始化
$(o).ui_button();
});
}
jfinal技术
public void logout() {
if (getSession().getAttribute("username") != null) {
// 清除session
getSession().removeAttribute("username");
}
ajaxDoneSuccess("登出成功!");
renderJson();
}
增加logout方法。

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持黑区网络。
