?? manageleft.jsp
字號(hào):
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="StyleSheet" href="${pageContext.request.contextPath}/css/global.css" type="text/css" />
<script type='text/javascript' src='${pageContext.request.contextPath}/dwr/interface/RoleMgrImpl.js'></script>
<script type='text/javascript' src='${pageContext.request.contextPath}/dwr/engine.js'></script>
<script type="text/javascript">
//定義全局變量
var roleId = 0;
function addRole(){
var width = 400;
var height = 200;
var left = (screen.width/2) - width/2;
var top = (screen.height/2) - height/2;
var styleStr = 'toolbar=no,location=no,directories=auto,status=no,menubar=no,scrollbars=yes resizable=no,z-lock=yes,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top;
window.open("${pageContext.request.contextPath}/admin/role/addRole.jsp",'',styleStr);
}
function delRole(id){
roleId = id;
if(confirm("確認(rèn)刪除此角色?")){
RoleMgrImpl.hasRelation(roleId, callback);
}
}
function callback(result){
var flag = true;
if(result){
if(!confirm("該角色有關(guān)聯(lián)其它信息,確認(rèn)刪除該角色?")){
flag = false;
}
}
if(flag){
location.href = "${pageContext.request.contextPath}/role.do?dispatch=deleteRole&type=1&roleId=" + roleId;
}
}
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#F1F0F7">
<tr>
<td height="600" valign="top" class="dtree">
<br/>
<input type="button" class="userButton" value="添加角色" onclick="addRole();"><br/>
<img src="${pageContext.request.contextPath}/images/vline.gif"><br/>
<logic:iterate id="role" name="roles" scope="request">
<img src="${pageContext.request.contextPath}/images/join.gif">
<a href="${pageContext.request.contextPath}/role.do?dispatch=getUsersToPage&roleId=${role.id}" target="mainframe">${role.roleName }</a>
<input type="button" class="userButton" value="刪除" onclick="delRole('${role.id }')"><br/>
<img src="${pageContext.request.contextPath}/images/vline.gif"><br/>
</logic:iterate>
</td>
</tr>
</table>
</body>
</html>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -