📄 orgpmenu.jsp
字号:
<!--
/**********************************************************
Copyright (C),2003-11-28, Beijing USTB.
All rights reserved.
Filename: orgpmenu.htm
Author:
Version 1.0
Date:2003-11-28
Description:部门新闻类别右键快捷菜单
Other:
Variable List:
Function List:
History:
***********************************************************
-->
<%@page language="java" contentType="text/html;charset=GBK"%>
<%@page import="java.util.*,java.text.*,java.sql.*,oa.main.DealString,javax.swing.tree.DefaultMutableTreeNode"%>
<STYLE>
.skin1 {
BORDER-RIGHT: buttonhighlight 0px outset; BORDER-TOP: buttonhighlight 0px outset; FONT-SIZE: 9pt; VISIBILITY: hidden; BORDER-LEFT: buttonhighlight 0px outset; WIDTH: 90px; CURSOR: default; BORDER-BOTTOM: buttonhighlight 0px outset; FONT-FAMILY: Arial, Helvetica, sans-serif; POSITION: absolute; BACKGROUND-COLOR: #000000; TEXT-ALIGN: center
}
.menuitems {
PADDING-RIGHT: 10px; PADDING-LEFT: 10px
}
</STYLE>
<SCRIPT language=JavaScript1.2>
<!-- Begin
var menuskin = "skin1";
var display_url = 0;
function showmenuie51() {
var rightedge = document.body.clientWidth-event.clientX;
var bottomedge = document.body.clientHeight-event.clientY;
if (rightedge < ie5menu.offsetWidth)
ie5menu.style.left = document.body.scrollLeft + event.clientX - ie5menu.offsetWidth;
else
ie5menu.style.left = document.body.scrollLeft + event.clientX;
if (bottomedge < ie5menu.offsetHeight)
ie5menu.style.top = document.body.scrollTop + event.clientY - ie5menu.offsetHeight;
else
ie5menu.style.top = document.body.scrollTop + event.clientY;
ie5menu.style.visibility = "visible";
return false;
}
function hidemenuie51() {
ie5menu.style.visibility = "hidden";
}
function highlightie51() {
if (event.srcElement.className == "menuitems") {
event.srcElement.style.backgroundColor = "highlight";
event.srcElement.style.color = "white";
if (display_url)
window.status = event.srcElement.url;
}
}
function lowlightie51() {
if (event.srcElement.className == "menuitems") {
event.srcElement.style.backgroundColor = "";
event.srcElement.style.color = "black";
window.status = "";
}
}
function jumptoie51() {
if (event.srcElement.className == "menuitems") {
if (event.srcElement.getAttribute("target") != null)
window.open(event.srcElement.url, event.srcElement.getAttribute("target"));
else
window.location = event.srcElement.url;
}
}
// End -->
</SCRIPT>
<q class=skin1 id=ie5menu onmouseover="highlightie51()"
style="LEFT: 280px; TOP: 28px" onclick="jumptoie51()"; onmouseout="lowlightie51()">
<TABLE height="73" cellSpacing=1 cellPadding=0 width="95%" align=center
bgColor=#000000>
<TBODY>
<TR>
<TD
onmouseover="this.style.backgroundColor='#999900'; this.style.cursor='hand';"
onmouseout="this.style.backgroundColor='#99cc33';" bgColor=#99cc00 height=20 scroll="no" onload="window.defaultStatus='00009876.4567.net';" onclick="addorgmenu()">
<CENTER>增加子类</CENTER></TD></TR>
<%//if(!strId.equals("")){%>
<TR>
<TD
onmouseover="this.style.backgroundColor='#ff9900'; this.style.cursor='hand';"
onmouseout="this.style.backgroundColor='#ffcc00';" bgColor=#ffcc00 height=20 onclick="modorgmenu()">
<CENTER>修改信息</CENTER></TD></TR>
<TR>
<TD
onmouseover="this.style.backgroundColor='#ff9900'; this.style.cursor='hand';"
onmouseout="this.style.backgroundColor='#ffffff';" vAlign=center
bgColor=#ffffff height="20" onclick="delorgmenu()">
<CENTER>删除信息</CENTER></TD></TR>
<%//}%>
</TBODY></TABLE></q>
<SCRIPT language=JavaScript1.2>
var tag = "1";
function onclickshoworgmenu(id1,id2)
{
tag = "2";
document.all.txt_pid.value = id1;
document.all.txt_id.value = id2;
document.oncontextmenu = showmenuie51;
document.body.onclick = hidemenuie51;
}
if (document.all && window.print)
{
ie5menu.className = menuskin;
document.oncontextmenu = showmenuie51;
document.body.onclick = hidemenuie51;
}
function nocontextorgmenu()
{
event.cancelBubble = true
event.returnValue = false;
return false;
}
function norightclickorgmenu(e)
{
if (window.Event)
{
if (e.which == 2 || e.which == 3)
return false;
}
else if (event.button == 2 || event.button == 3)
{
event.cancelBubble = true
event.returnValue = false;
return false;
}
}
function onclickhideorgmenu()
{
if (window.Event)
document.captureEvents(Event.MOUSEUP);
if(tag=="1")//鼠标单击在显示菜单地方之外
{
document.oncontextmenu = nocontextorgmenu; // for IE5+
document.onmousedown = norightclickorgmenu; // for all others
}
tag = "1";
}
//增
function addorgmenu()
{
document.all.txt_type.value = "5";
document.all.txt_edit.value = "1";
document.all.form1.action = "indexmenu.jsp";
document.all.form1.submit();
}
//改
function modorgmenu()
{
if(document.all.txt_id.value=="")
{
alert("部门不能修改!");
}
else
{
document.all.txt_type.value = "5";
document.all.txt_edit.value = "2";
document.all.form1.action = "indexmenu.jsp";
document.all.form1.submit();
}
}
//删
function delorgmenu()
{
if(document.all.txt_id.value=="")
{
alert("部门不能删除!");
}
else
{
if(!confirm("是否真的要删除?"))
{
}
else
{
document.all.txt_type.value = "5";
document.all.txt_edit.value = "3";
document.all.form1.action = "../../Org";
document.all.form1.submit();
}
}
}
</SCRIPT>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -