!--One step to installing this script--
成都創(chuàng)新互聯(lián)公司堅(jiān)持“要么做到,要么別承諾”的工作理念,服務(wù)領(lǐng)域包括:做網(wǎng)站、網(wǎng)站建設(shè)、企業(yè)官網(wǎng)、英文網(wǎng)站、手機(jī)端網(wǎng)站、網(wǎng)站推廣等服務(wù),滿足客戶于互聯(lián)網(wǎng)時(shí)代的岫巖網(wǎng)站設(shè)計(jì)、移動(dòng)媒體設(shè)計(jì)的需求,幫助企業(yè)找到有效的互聯(lián)網(wǎng)解決方案。努力成為您成熟可靠的網(wǎng)絡(luò)建設(shè)合作伙伴!
!--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.在頁(yè)面跳轉(zhuǎn)控制action或者serlvet獲取權(quán)限
2.寫一個(gè)header.jsp(需要的頁(yè)面引入就行)?需要standard.jar和jstl-1.2.jar
%@?taglib?prefix="c"?uri=""?%
核心代碼:
!--?多個(gè)權(quán)限?--
c:forEach?var?=?"auth"?items="${sessionScope.user.auths}"
!--?單個(gè)權(quán)限判斷?--
c:if?test='${auth=="xxx"}'
!--?寫入你權(quán)限下的導(dǎo)航--
/c:if
...
/c:forEach
還有其他不清楚的么