javascript
html实现静态下来菜单js,JS代码实现静态导航菜单效果要用何主要代码?
【實例代碼】html xmlns=http://www。w3。org/1999/xhtml headtitle標題頁-學無憂(www。xue51。com)/title/headBODY bgcolor=#ffffff OnLoad=setVariables();checkLocation()script language=JavaScriptfunction setVariables() {if (navigator。
appName == Netscape) {//瀏覽器是netscape的情況 v=。top=; dS=document。; sD=; y=window。pageYOffset; }else { //瀏覽器是ie的情況 v=。pixelTop=; dS=; sD=。
style; y=document。body。scrollTop; //如果頁面有滾動條,獲取滾動條的頂端位置 }}function checkLocation() { object=object1; //獲取指定的div yy=eval(y); eval(dS+object+sD+v+yy); //連接字符串,旨在讓靜態導航菜單一直在頁面滾動條的上端 setTimeout(checkLocation(),10);}/scriptdiv id=object1 style=position:absolute; visibility:show; left:0px; top:0px; z-index:5 table width=150 border=0 cellspacing=20 cellpadding=0 tr td bgcolor=#EAEAEA center 靜態導航菜單 /center /td /tr tr td bgcolor=#EAEAEAa href=http://www。
microsoft。com 微軟網站/a/td /tr tr td bgcolor=#EAEAEAa href=http://www。yahoo。com 雅虎網站/a/td /tr tr td bgcolor=#EAEAEAa href=http://www。
baidu。com百度搜索/a/td /tr tr td bgcolor=#EAEAEAa href=http://mail。263。com 263郵局/a/td /tr /table /div/body/html。
全部
總結
以上是生活随笔為你收集整理的html实现静态下来菜单js,JS代码实现静态导航菜单效果要用何主要代码?的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 计算机网络应用和计算机应用有什么区别,什
- 下一篇: html5怎么设置勾选,word文档怎么