就是我想在后台动态的编写toolbar的各个参数,然后让前台按钮动态实现,求解答啊
toolbar : [{
id:'add',
iconCls : 'icon-add',
text : '添加权限',
handler : function() {
addSystem();
}
}, '-', {
iconCls : 'icon-edit',
text : '编辑权限',
iconAlign : 'left',
handler : function() {
updateSystem();
}
}, '-', {
iconCls : 'icon-remove',
text : '删除权限',
iconAlign : 'left',
handler : function() {
if (confirm("确定要删除吗")) {
deleteSystem();
} else {
return false;
}
}
}]
在后台直接把这段js输出到页面的脚本区。
如:
<script type="text/javascript">。。。。。?不明白
追答
无标题文档
$(document).ready(function(){
if($("#userName").val()=="管理员"){
$("#div1").append(" 我是管理员请给我所有权限.");
}
});
你是什么级别的?
不是一个问题啊
追答input 是后台给的当前用户的权限 不同的值得到不同的回答也就是按钮
本回答被提问者采纳