将下代码copy入你网页的<head>和</head>中。
<SCRIPT LANGUAGE="JavaScript">
<!--
var n = 1
var nn = 2
var nnn = 3
var nnnn = 4 /*这是设置显示的按钮数量,可根据情况增减。记住相应调整表单里的<INPUT>标记*/
var theMessages = new Array(7); {
theMessages[1] = "转到第一个页面"
theMessages[2] = "转到第二个页面"
theMessages[3] = "转到第三个页面"
theMessages[4] = "转到第四个页面"
theMessages[5] = "转到第五个页面"
theMessages[6] = "转到第六个页面"
theMessages[7] = "转到第七个页面" /*这个字符串数组也可不要*/
}
var theValues = new Array(7); {
theValues[1] = "返回首页"
theValues[2] = "页面制作"
theValues[3] = "Flash专区"
theValues[4] = "网站推广"
theValues[5] = "动态技术"
theValues[6] = "图象处理"
theValues[7] = "你的论坛" } /*可根据情况增减*/
function goup() {
if(n > 1){n = n-1
nn = nn-1
nnn = nnn-1
nnnn = nnnn-1
/*显示的按钮数量如果作了改变,这里也要做相应调整*/
update()}}
function godown() {
if(nnnn < 7) { /*根据前面的情况做相应调整*/
n++
nn++
nnn++
nnnn++
update()}
else{}}
/*用'window.location.href="文件名.html"' 代替alert(capX)*/
function go1() {
alert(cap1)}
function go2() {
alert(cap2)}
function go3() {
alert(cap3)}
function go4() {
alert(cap4)}
function update() {
document.form1.b1.value = theValues[n]
document.form1.b2.value = theValues[nn]
document.form1.b3.value = theValues[nnn]
document.form1.b4.value = theValues[nnnn]
cap1 = theMessages[n]
cap2 = theMessages[nn]
cap3 = theMessages[nnn]
cap4 = theMessages[nnnn]}
//-->
</SCRIPT>
变<body>为<body onLoad="update()">。
将下代码copy入你网页的<body>和</body>中。
<form name="form1">
<input type=BUTTON name="up" value="返回首页 "
onClick="go1()">
<br>
<input type=BUTTON name="up" value="页面制作 "
onClick="go2()">
<br>
<input type=BUTTON name="up" value="Flash专区 "
onClick="go3()">
<br>
<input type=BUTTON name="up" value="网站推广 "
onClick="go4()">
<br>
<input type=BUTTON name="up" value=" v "
onClick="godown()">
<br>
</form>
|