JS导航栏源码Word文档下载推荐.docx
- 文档编号:22537119
- 上传时间:2023-02-04
- 格式:DOCX
- 页数:22
- 大小:19.73KB
JS导航栏源码Word文档下载推荐.docx
《JS导航栏源码Word文档下载推荐.docx》由会员分享,可在线阅读,更多相关《JS导航栏源码Word文档下载推荐.docx(22页珍藏版)》请在冰豆网上搜索。
这里可以设置滚动的速度-->
animate()"
}
/script>
--案例代码1结束-->
--案例代码2开始-->
formmethod="
POST"
name="
wheel"
>
<
divalign="
center"
--[Step2]:
在此能够更改选择框的行数-->
selectname="
wheel2"
size="
5"
--[Step3]:
这里可以设置链接对应的网址-->
--[Step4]:
在此能够更改链接的名称-->
optionvalue="
"
263在线<
/option>
新浪网<
搜狐网<
雅虎网<
/select>
/div>
--[Step5]:
这里可以设置按钮的名称-->
inputtype="
button"
value="
转动滚轮"
B1"
onClick="
/form>
--案例代码2结束-->
/BODY>
/HTML>
2旋转菜单
菜单导航篇--旋转菜单<
--案例代码开始-->
varobjects;
varpos;
varr=110;
这里可以更改旋转菜单的中心坐标-->
varxoff=350;
varyoff=240;
varpi=Math.PI;
varinc=pi/180;
functionshowObject(object){
object.visibility=VISIBLE;
functionhideObject(object){
object.visibility=HIDDEN;
functionslidepicture(from,to){
if(from<
to){
website.top=(from+=10);
setTimeout('
slidepicture('
+from+'
'
+to+'
)'
75);
}
elseinitObjects();
functioninitObjects(){
objects=newArray(circle1,circle2,circle3,circle4,circle5,circle6);
pos=newArray();
pos[0]=0;
for(vari=1;
i<
objects.length;
i++){
pos[i]=parseFloat(pos[i-1]+((2*pi)/objects.length));
rotateObjects();
functionrotateObjects(){
for(vari=0;
pos.length;
pos[i]+=inc;
objects[i].visibility='
visible'
;
objects[i].left=(r*Math.cos(pos[i]))+xoff
objects[i].top=(r*Math.sin(pos[i]))+yoff;
rotateTimer=setTimeout("
rotateObjects()"
在此能够按序增加菜单的名称-->
divid="
circle1"
class="
circle"
ahref="
onmouseover="
showObject(text1)"
onmouseout="
hideObject(text1)"
旋转菜单1<
/a>
circle2"
showObject(text2)"
hideObject(text2)"
旋转菜单2<
circle3"
showObject(text3)"
hideObject(text3)"
旋转菜单3<
circle4"
showObject(text4)"
hideObject(text4)"
旋转菜单4<
circle5"
showObject(text5)"
hideObject(text5)"
旋转菜单5<
circle6"
showObject(text6)"
hideObject(text6)"
旋转菜单6<
text1"
text"
palign="
b>
旋转子菜单<
/b>
子菜单1。
子菜单2。
子菜单3。
子菜单4。
子菜单5。
text2"
text3"
text4"
text5"
text6"
varisNS=(navigator.appName=="
Netscape"
&
&
parseInt(navigator.appVersion)>
=4);
varHIDDEN=(isNS)?
'
hide'
:
hidden'
varVISIBLE=(isNS)?
show'
varcircle1=(isNS)?
document.circle1:
document.all.circle1.style;
varcircle2=(isNS)?
document.circle2:
document.all.circle2.style;
varcircle3=(isNS)?
document.circle3:
document.all.circle3.style;
varcircle4=(isNS)?
document.circle4:
document.all.circle4.style;
varcircle5=(isNS)?
document.circle5:
document.all.circle5.style;
varcircle6=(isNS)?
document.circle6:
document.all.circle6.style;
vartext1=(isNS)?
document.text1:
document.all.text1.style;
vartext2=(isNS)?
document.text2:
document.all.text2.style;
vartext3=(isNS)?
document.text3:
document.all.text3.style;
vartext4=(isNS)?
document.text4:
document.all.text4.style;
vartext5=(isNS)?
document.text5:
document.all.text5.style;
vartext6=(isNS)?
document.text6:
document.all.text6.style;
slidepicture(0,0);
style>
.circle{font-family:
Verdana,Helvetica;
font-size:
12px;
color:
#000000;
position:
absolute;
visibility:
hidden;
z-index:
2}
.text{text-align:
left;
font-family:
#000000;
absolute;
top:
185px;
left:
280px;
width:
225px;
0}
.picture{font-family:
10px;
visible;
1}
/style>
--案例代码结束-->
3页面在框架外
菜单导航篇--页面在框架外<
if(window!
=top)top.location.href=location.href
5滑出的菜单栏
菜单导航篇--滑出的菜单条<
layerid="
slidemenubar"
onMouseover="
pull()"
onMouseout="
draw()"
if(document.all)document.write('
slidemenubar2"
style="
left:
-150"
'
)
varsitems=newArray()
这里可以按序增加菜单条的名称-->
sitems[0]="
263在线"
sitems[1]="
新浪网"
sitems[2]="
雅虎网"
sitems[3]="
搜狐网"
在此能够按序增加菜单名称的网址-->
varsitemlinks=newArray()
sitemlinks[0]="
sitemlinks[1]="
sitemlinks[2]="
sitemlinks[3]="
for(i=0;
i<
=sitems.length-1;
i++)
document.write('
ahref='
+sitemlinks[i]+'
ONMOUSEOVER="
+'
returntrue;
ONMOUSEOUT="
+sitems[i]+'
/layer>
functionregenerate(){window.location.reload()}
functionregenerate2(){if(document.layers)setTimeout("
window.onresize=regenerate"
400)}
window.onload=regenerate2
if(document.all){
document.write('
themenu=document.all.slidemenubar2.style
rightboundary=0
leftboundary=-150}
else{
themenu=document.layers.slidemenubar
rightboundary=150
leftboundary=10
functionpull(){
if(window.drawit)clearInterval(drawit)
pullit=setInterval("
pullengine()"
50)
functionpullengine(){
if(document.all&
themenu.pixelLeft<
rightboundary)themenu.pixelLeft+=5
elseif(document.layers&
themenu.left<
rightboundary)themenu.left+=5
elseif(window.pullit)clearInterval(pullit)
functiondraw(){
clearInterval(pullit)
drawit=setInterval("
drawengine()"
functiondrawengine(){
themenu.pixelLeft>
leftboundary)themenu.pixelLeft-=5
themenu.left>
leftboundary)themenu.left-=5
elseif(window.drawit)clearInterval(drawit)
A:
hover{color:
#ffff00}
visited:
{color:
#FF0000}
在此能够修改菜单条的宽度-->
{}
这里可以更改菜单条的初始位置-->
在此能够设置菜单条的背景颜色-->
#slidemenubar,#slidemenubar2{position:
width:
170px;
-155px;
top:
border:
1pxsolidred;
background-color:
#9999FF;
font:
bold12pxHelvetica;
line-height:
14px;
6左面滑出的菜单栏
菜单导航篇--左面滑出的左右菜单<
varmoveOnScroll=true
vartim;
varltop;
functionmoveMenu(){
if(!
oMenu.state){clearTimeout(tim);
MenuIn()}
else{clearTimeout(tim);
MenuOut()}
functionmakeMenu(obj,nest){
nest=(!
nest)?
:
document.'
+nest+'
.'
this.css=(document.layers?
1:
0)?
eval(nest+'
+obj):
eval(obj+'
.style'
)
this.state=1
this.go=0
this.width=(document.layers?
0)?
this.css.document.width:
.offsetWidth'
this.left=b_getleft
this.obj=obj+"
Object"
eval(this.obj+"
=this"
functionMenuIn(){
if(oMenu.left()>
-oMenu.width+50){
oMenu.go=1
oMenu.css.left=oMenu.left()-10
tim=setTimeout("
MenuIn()"
40)}
else{oMenu.go=0;
oMenu.state=1}
functionMenuOut(){
if(oMenu.left()<
0){
oMenu.css.left=oMenu.left()+10
MenuOut()"
oMenu.state=0}
functionb_getleft(){
vargleft=(document.layers?
eval(this.css.left):
eval(this.css.pixelLeft);
re
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- JS 导航 源码