重庆分公司,新征程启航
为企业提供网站建设、域名注册、服务器等服务
!--One step to installing this script--
成都创新互联公司坚持“要么做到,要么别承诺”的工作理念,服务领域包括:做网站、网站建设、企业官网、英文网站、手机端网站、网站推广等服务,满足客户于互联网时代的岫岩网站设计、移动媒体设计的需求,帮助企业找到有效的互联网解决方案。努力成为您成熟可靠的网络建设合作伙伴!
!--1) Simply add the below to your BODY:--
script LANGUAGE="JavaScript1.2"
!--
/*
For this script, visit
or
*/
var WhereTo = null;
var TimerID = null;
var now = new Date();
var pos = 0;
var StartTime = null;
var PauseTime = 3000;
// Change the PauseTime value (in milliseconds) to
// change the speed at which the button URLs rotate.
function InitializeArray() {
this.length = InitializeArray.arguments.length
for (var i = 0; i this.length; i++)
{
this[i+1] = InitializeArray.arguments[i]
}
}
function ParseString(data,num) {
for(var i=0;idata.length;i++)
{
if(data.substring(i,i+1)=="|") break;
}
if (num==0) return(data.substring(0,i));
else return(data.substring(i+1,data.length));
}
function StartTimer() {
now = new Date();
StartTime=now.getTime();
StopTimer();
WhereTo = new InitializeArray("Java-Scripts.net|",
"Free-Backgrounds|",
"Website Abstraction|",
"Dynamic Drive|",
"MSNBC.com|",
"Geocities|",
"CodeArena.com|",
"Email Us|george@java-scripts.net");
ShowTimer();
}
function StopTimer() {
TimerID = null;
WhereTo = null;
}
function ShowTimer() {
pos= (pos == WhereTo.length) ? 1 : pos + 1;
document.forms[0].elements[0].value=ParseString(WhereTo[pos],0);
TimerID=window.setTimeout('ShowTimer()',PauseTime);
}
function DestinationUrl() {
this.location=ParseString(WhereTo[pos],1);
return (false);
}
window.onload=window.StartTimer
//--
/script
form
div align="center"centerpinput TYPE="button" VALUE=" Cool Links! "
NAME="Destination" onClick="window.DestinationUrl()"
/form
import java.awt.Button;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JFrame;
public class Demo {
public static void main(String[] args) {
Demo demo = new Demo();
demo.run();
}
public void run() {
JFrame frame = new JFrame("title1");
frame.setLayout(null);
frame.setBounds(10, 10, 500, 300);
Button button = new Button("click");
button.setBounds(15, 15, 200, 100);
frame.add(button);
frame.setVisible(true);
button.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
JFrame frame = new JFrame("title2");
frame.setLayout(null);
frame.setBounds(20, 20, 300, 100);
frame.setVisible(true);
}
});
}
}
1.在页面跳转控制action或者serlvet获取权限
2.写一个header.jsp(需要的页面引入就行) 需要standard.jar和jstl-1.2.jar
%@ taglib prefix="c" uri="" %
核心代码:
!-- 多个权限 --
c:forEach var = "auth" items="${sessionScope.user.auths}"
!-- 单个权限判断 --
c:if test='${auth=="xxx"}'
!-- 写入你权限下的导航--
/c:if
...
/c:forEach
还有其他不清楚的么