`
chaoyi
  • 浏览: 290171 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

后台切换jsp switch.jsp

 
阅读更多
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<base href="<%=basePath%>">
<title></title>
<style type="text/css">
* {
	margin: 0;
	padding: 0;
}
</style>
</head>
<script language="javascript">
	function $(id) {
		return document.getElementById(id);
	}

	window.onload = function() {
		var count = 0;
		$("menuSwitch").onclick = function() {
			var mainFrame = top.document.getElementById("framePage");
			var menuSwitch = $("menuSwitch");
			if (count % 2 == 0) {
				mainFrame.cols = "0,10,*";
				menuSwitch.style.backgroundImage = 'url(admin/images/frameShow.gif)';
				menuSwitch.title = '点击打开管理界面菜单';
			} else {
				mainFrame.cols = "153,10,*";
				menuSwitch.style.backgroundImage = 'url(admin/images/frameHide.gif)';
				menuSwitch.title = '点击隐藏管理界面菜单';
			}
			count++;
		};
	};
</script>
</head>

<body>
	<div
		style="height:800px; padding-top:260px; width:100px; cursor:pointer; background:url(admin/images/frameSwitchBj.gif) repeat-y;">
		<div id="menuSwitch"
			style="background:url(admin/images/frameHide.gif) no-repeat; width:10px; height:86px;"
			title="点击隐藏管理界面菜单"></div>
	</div>
</body>
</html>

 

效果图:

 

  • 大小: 2 KB
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics