⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 roleleft.jsp

📁 基于Sturts+Spring+Hibernate的一个高级销售管理系统。内容丰富
💻 JSP
字号:
<%@ 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 = 220;
				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=no, 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("确认删除此角色?")){
					RoleMgrImpl.hasRelation(roleId, callback);
				}
			}
			
			function callback(result){
				var flag = true;
				if(result){
					if(!confirm("该角色有关联其它信息,确认删除该角色?")){
						flag = false;
					}
				}
				if(flag){
					location.href = "${pageContext.request.contextPath}/role.do?dispatch=deleteRole&type=2&roleId=" + roleId;
				}
			}
		</script>	
	</head>
	<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
      <table width="98%" border="0" cellspacing="0" cellpadding="0" background="${pageContext.request.contextPath}/images/tiao.gif" align="center">
            <tr >
            	<td  height="27"  align="center">
					<input type="button" class="userButton" value="添加角色" onclick="addRole();">
				</td>
   	 		</tr>
       </table>
          <table width="98%" border="0" cellspacing="0" cellpadding="0"
			align="center">
			<tr>
				<td bgcolor="#CCCCCC" width="1%" height="2"></td>
				<td  width="2%" height="2" bgcolor="#F3F7FA">&nbsp;</td>
				<td height="2" width="95%" bgcolor="#F3F7FA">
      <div id="myContacts" style="text-align: center;">   
      <table width="98%" cellspacing="0" cellpadding="0" align="center" bordercolor="#000000" bordercolordark="#FFFFFF">       
      		<tr>
			  <td height="550" valign="top" >
			  	<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=getObjToPage&objId=${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>
      </div>      
				</td>
				<td bgcolor="#CCCCCC" width="1%" height="2"></td>
			</tr>
		</table>
		<table width="98%" border="0" cellspacing="0" cellpadding="0" align="center">
			<tr>
				<td width="8" height="5" valign="top">
					<img src="${pageContext.request.contextPath}/images/left.gif" width="8" height="11">
				</td>
				<td background="${pageContext.request.contextPath}/images/ht.gif" height="11">
					&nbsp;
				</td>
				<td width="8" height="5" valign="top">
					<img src="${pageContext.request.contextPath}/images/rg.gif" width="8" height="11">
				</td>
			</tr>
		</table>
	</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -