大概思路是鼠标经过一个连接,然后在下面弹出菜单
<% i=1
do while not rs.eof%>
<a href="note/index_note.asp?class1id=<%=rs("id")%>" onMouseMove="expandcontent('sc<%=i%>')"><font color="#FFFFFF"><%=rs("class1name")%></font></a>
|
<%
rs.movenext
i=i+1
loop
rs.close
%>
这一段是主菜单
var previoustab = "";
function expandcontent(cid)
{
if (previoustab != "")
document.getElementById(previoustab).style.display = "none"
document.getElementById(cid).style.display = "block"
previoustab = cid
}
这是鼠标经过调用的过程
<%
Set Rs1 = Server.CreateObject("Adodb.RecordSet")
NewsSql1 = "select distinct class1id From Class2"
Rs1.Open NewsSql1,Conn_note,1,1
if Not Rs1.Bof And Not Rs1.Eof then
submeunid=1
Do While Not Rs1.Eof
%>
<div id=sc<%=submeunid%>>
<%
sql="select * from Class2 where class1id ="&Rs1("class1id")&" order by id asc"
rs.open sql,conn_note,1,1
do while not rs.eof
response.Write submeunid
%>
<a href="note/index_note.asp?class1id=<%=Rs1("class1id")%>&class2id=<%=rs("ID")%>"><%=rs("class2name")%></a>|
<%
rs.movenext
loop
rs.close
%>
</div>
<%
submeunid=submeunid+1
Rs1.MoveNext
Loop
end if
Set Rs1 = Nothing
%>
这是要显示的二级菜单
欢迎远程
谢谢