左侧的论坛列表中的下拉菜单使用的是什么脚本语言做的?

songthing 2002-03-02 08:06:19
左侧的论坛列表中的下拉菜单使用的是什么脚本语言做的?javascript?vbscript?还是用的flash?请各位高手指教!
...全文
77 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
softbunny 2002-05-11
  • 打赏
  • 举报
回复
不用这莫费力,用Fireworks很简单就高定了
songthing 2002-05-11
  • 打赏
  • 举报
回复
非常感谢小仙妹,我想给你分,但不知道怎么做.我的QQ43923772
纪俊 2002-03-18
  • 打赏
  • 举报
回复
用Dreamweaver作的话,用时间线功能来实现,把你的菜单做成一个层,然后在需要的地方做一个出发器,让其显示那个预先做好的但一开始的时候是隐藏的层,然后计时,超过一定的时间就让层隐藏.
KiteGirl 2002-03-18
  • 打赏
  • 举报
回复
SY.vbs内容:

Dim pubMenuCont
Dim pubMenuItems
Dim pubMenuURLs
Dim pubMenuVisibie
Dim pubMenuButton

Set pubMenuButton=idMenuButton

'idVW.innerText=pubObjectDocument_MenuL1.innerText

Set pubMenuCont=MenuContMake(pubObjectDocument_MenuL1)
MenuContPosition pubMenuCont,20,1

ReDim pubMenuItems(9)
ReDim pubMenuURLs(9)
ReDim pubMenuL1Links(9)
ReDim pubMenuL1TDs(9)
pubMenuVisibie=0
pubMenuItems(0)="基本理论":pubMenuURLs(0)="http://www.csdn.net/"
pubMenuItems(1)="软件开发":pubMenuURLs(1)="http://www.csdn.net/"
pubMenuItems(2)="软件工程":pubMenuURLs(2)="http://www.csdn.net/"
pubMenuItems(3)="Visual Studio":pubMenuURLs(3)="http://www.csdn.net/"
pubMenuItems(4)="Visual .NET":pubMenuURLs(4)="http://www.csdn.net/"
pubMenuItems(5)="Web开发":pubMenuURLs(5)="http://www.csdn.net/"
pubMenuItems(6)="数据库":pubMenuURLs(6)="http://www.csdn.net/"
pubMenuItems(7)="软件开发":pubMenuURLs(7)="http://www.csdn.net/"
pubMenuItems(8)="软件开发":pubMenuURLs(8)="http://www.csdn.net/"
pubMenuItems(9)="软件开发":pubMenuURLs(9)="http://www.csdn.net/"

Sub document_onmouseover()
Set tSurElement=window.event.srcElement
If Left(tSurElement.id,10)="MenuL1Item" Then
If tSurElement.tagName="TD" Then
tSurElement.className="cssTable_cL" & Right(tSurElement.className,2)
For Each tLink in tSurElement.all.tags("A")
tLink.className="cssTable_cL" & Right(tLink.className,2)
Next
ElseIf tSurElement.tagName="A" Then
tSurElement.parentElement.className="cssTable_cL" & Right(tSurElement.parentElement.className,2)
tSurElement.className="cssTable_cL" & Right(tSurElement.className,2)
End If
End If
End Sub

Sub document_onmouseout()
Set tSurElement=window.event.srcElement
If Left(tSurElement.id,10)="MenuL1Item" Then
If tSurElement.tagName="TD" Then
tSurElement.className="cssTable_cH" & Right(tSurElement.className,2)
For Each tLink in tSurElement.all.tags("A")
tLink.className="cssTable_cH" & Right(tLink.className,2)
Next
ElseIf tSurElement.tagName="A" Then
tSurElement.parentElement.className="cssTable_cH" & Right(tSurElement.parentElement.className,2)
tSurElement.className="cssTable_cH" & Right(tSurElement.className,2)
End If
End If
End Sub

Sub document_onclick() '激励解释器
tCommand=Chr(13) & Chr(10) & tCommand & "ClickEvent:" & Time & ":" & Timer & Chr(13) & Chr(10)
Set tSurElement=window.event.srcElement
tSurElementName=tSurElement.id

tMenuButton_Click=(pubMenuButton.outerHTML = tSurElement.outerHTML)
tMenuL1_ON=(tMenuButton_Click and Not pubMenuVisibie)
tMenuL1_OFF=(tMenuButton_Click Or Not Left(tSurElementName,4)="Menu") and pubMenuVisibie

If tMenuButton_Click Then
tCommand=tCommand & "MenuButton_Click" & Chr(13) & Chr(10)
End If

If tMenuL1_ON Then
MenuContPosition pubMenuCont,pubMenuButton.offsetTop,pubMenuButton.offsetLeft+pubMenuButton.offsetWidth
MenuTableMake pubMenuCont,pubMenuItems,pubMenuURLs
pubMenuVisibie=-1
tCommand=tCommand & "MenuL1_ON" & Chr(13) & Chr(10)
ElseIf tMenuL1_OFF Then
pubMenuVisibie=0
tCommand=tCommand & "MenuL1_OFF" & Chr(13) & Chr(10)
End If
'idVW2.innerText= tCommand & Chr(13) & Chr(10)
MenuContSetEnabled pubMenuCont,pubMenuVisibie
End Sub
KiteGirl 2002-03-18
  • 打赏
  • 举报
回复
另外有一个原理验证阶段的实验品。

html文件内容:

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新网页 2</title>
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<link rel="StyleSheet" type="text/css" href="Styles/AriesStyle01.css">
</head>

<body>

<p id="idVW">AAA</p>
<p id="idVW2">AAA</p>

<IMG src="Images/MenuButton_OFF.gif" id="idMenuButton" class="cssMouseIcon_Link">

<table border="0" cellpadding="0" cellspacing="0" width="600">
<tr>
<td align="center">a</td>
</tr>
<tr>
<td align="center">a</td>
</tr>
<tr>
<td align="center">a</td>
</tr>
<tr>
<td align="center">a</td>
</tr>
</table>
</body>
<script language="VBScript" type="text/VBScript" src="Scripts/Temp.vbs">
</script>
<script language="VBScript" type="text/VBScript" src="Scripts/SY.vbs">
</script>
</html>

Temp.vbs内容:

Dim pubObjectDocument_Default
Dim pubObjectDocument_MenuButtom
Dim pubObjectDocument_MenuL1
Dim pubObjectDocument_MenuL2
Dim pubObjectDocument_MenuL3
Set pubObjectDocument_Default=window.document
Set pubObjectDocument_MenuButtom=pubObjectDocument_Default
Set pubObjectDocument_MenuL1=pubObjectDocument_Default
Set pubObjectDocument_MenuL2=pubObjectDocument_Default
Set pubObjectDocument_MenuL3=pubObjectDocument_Default

'idVW.innerText=pubObjectDocument_Default.body.innerHTML

Function MenuContSetEnabled(pCont,pBool)
'根据一个Bool值开启或隐藏一个菜单容器。
If pBool Then
tVisibility="visible"
Else
tVisibility="hidden"
End If
pCont.style.Visibility=tVisibility
End Function

Function MenuContGetEnabled(pCont,pBool)
'根据一个Bool值开启或隐藏一个菜单容器。
End Function

Function MenuContPosition(pCont,pTop,pLeft)
'定位菜单容器。
pCont.style.top=pTop
pCont.style.left=pLeft
End Function

Function MenuContMake(pDocument)
'创建容器。
Set tOutElement=pDocument.createElement("DIV")
tOutElement.style.visibility="hidden"
tOutElement.style.position="absolute"
tOutElement.style.top="0"
tOutElement.style.left="0"
pDocument.body.insertAdjacentElement "afterBegin",tOutElement
Set MenuContMake=tOutElement
End Function

Function MenuTableMake(pMenuCont,pMenuItems(),pMenuURLs())
tLoopOn=LBound(pMenuItems):tLoopEnd=UBound(pMenuItems)
Set tTBODYElement=pubObjectDocument_Default.createElement("TBODY")
Set tTABLEElement=pubObjectDocument_Default.createElement("TABLE")
tTABLEElement.border="0"
tTABLEElement.cellpadding="0"
tTABLEElement.cellspacing="1"

For tLoop=tLoopOn To tLoopEnd
Set tLinkElement=pubObjectDocument_Default.createElement("A")
tLinkElement.className="cssTable_cH0" & CStr((tLoop Mod 7)+1)
tLinkElement.id="MenuL1Item_A" & tLoop
tLinkElement.Href=pMenuURLs(tLoop)
tLinkElement.innerText=pMenuItems(tLoop)
Set tTDElement=pubObjectDocument_Default.createElement("TD")
tTDElement.className="cssTable_cH0" & CStr((tLoop Mod 7)+1)
tTDElement.id="MenuL1Item_TD" & tLoop
tTDElement.insertAdjacentElement "beforeEnd",tLinkElement
tTDElement.width="100"
tTDElement.align="center"
Set tTRElement=pubObjectDocument_Default.createElement("TR")
tTRElement.id="MenuL1ItemTR_" & tLoop
tTRElement.insertAdjacentElement "beforeEnd",tTDElement
tTBODYElement.insertAdjacentElement "beforeEnd",tTRElement
Next
tTABLEElement.insertAdjacentElement "beforeEnd",tTBODYElement
pMenuCont.innerHTML=tTABLEElement.outerHTML
End Function



KiteGirl 2002-03-18
  • 打赏
  • 举报
回复
VBScript和JavaScript都可以。

  最简单的办法是隐藏若干被定位的Table,在适当时机被显示出来。
  我最近正在编写一个所谓的“真正”的菜单程序,这个菜单程序是动态生成元素实现的。原理是给定三个数组(对应三级菜单),根据数组动态生成菜单。你可以尝试下面几个函数(VBScript)。下面就是开发中的Menu程序的一个功能块,这个部分的作用就是动态生成指定的表格(菜单中非常重要一环),不过我做了一点没继续。
  另外下面的函数方法有点问题,不应该使用插TD的办法,而是有专门的方法插Cell。等我过些日子做好了可以给你一份。

Dim pubTable

Set pubTable=TableCreate(document,9,9,"idTABLE01")

document.body.insertAdjacentElement "beforeEnd",pubTable

'idVW.innerText=pubTable.outerHTML

'Set tTD=TableTD_CiteGet(pubTable,1,1)

For I=1 to 9
For J=1 to 9
TableTD_CiteGet(pubTable,I,J).innerText=CStr(I)
Next
Next

TableTD_WidthSet pubTable,2,100

'设置表格指定列的单元格宽度

Function TableTD_WidthSet(pTable,pTier,pWidth)

For Each tTRElement In pTable.all.tags("TR")

tTRElement.all.tags("TD")(pTier-1).width=pWidth

Next

End Function

'返回对表格指定行列TD元素的引用。

Function TableTD_CiteGet(pTable,pRow,pTier)

tTR_Length=pTable.all.tags("TR").Length

If Not pRow>tTR_Length Then
Set tTRElement=pTable.all.tags("TR")(pRow-1)

tTD_Length=tTRElement.all.tags("TD").Length

If Not pTier>tTD_Length Then

Set tOutCite=tTRElement.all.tags("TD")(pTier-1)

End IF
End If

Set TableTD_CiteGet=tOutCite

End Function

'创建一个指定行列数量的表格。

Function TableCreate(pDocument,pRow,pTier,pID)

Set tTABLEElement=pDocument.createElement("TABLE")
tTABLEElement.id=pID

Set tTBODYElement=pDocument.createElement("TBODY")
tTBODYElement.id=pID & "_TBODY"

For tRow=1 To pRow
Set tTRElement=pDocument.createElement("TR")
tTRElement.id=pID & "_TR" & StringFixedNumGet(tRow,2)

For tTier=1 To pTier
Set tTDElement=pDocument.createElement("TD")
tTDElement.id=pID & "_TD" & StringFixedNumGet(tRow,2) & StringFixedNumGet(tTier,2)

tTRElement.insertAdjacentElement "beforeEnd",tTDElement

Next

tTBODYElement.insertAdjacentElement "beforeEnd",tTRElement

Next

tTABLEElement.insertAdjacentElement "beforeEnd",tTBODYElement

Set TableCreate=tTABLEElement

End Function

'根据数字返回一个指定长度的数字字符串。

Function StringFixedNumGet(pNum,pLength)

tOutStr=CStr(pNum)
tStrLen=Len(tOutStr)

If tStrLen>pLength Then
tOutStr=Right(tOutStr,pLength)
ElseIf tStrLen<pLength Then
tOutStr=String(pLength-tStrLen,"0") & tOutStr
End If

StringFixedNumGet=tOutStr

End Function

karma 2002-03-02
  • 打赏
  • 举报
回复
javascript:
http://www.csdn.net/expert/Lostinet_HTMLTree.js
纪俊 2002-03-02
  • 打赏
  • 举报
回复
Javascrpt与Dreamweaver都能做
jzsh2000 2002-03-02
  • 打赏
  • 举报
回复
javascript
onice 2002-03-02
  • 打赏
  • 举报
回复
http://www.csdn.net/expert/Lostinet_HTMLTree.js

10,606

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 其他
社区管理员
  • 其他
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧