乙個ASP寫的側邊選單欄

2021-03-31 08:57:00 字數 2482 閱讀 8343

同於工作的必要,無意之中寫出了乙個asp的側邊的選單欄類。**如下:

<%

class menus

public title, id, image, titlecolor, target, background, headimage, height, width, bgcolor, style

private menuitem, menustr

private sub class_initialize

title = ""

id = ""

menuitem = ""

image=""

titlecolor = "#000000"

target = "_blank"

background = ""

headimage = ""

height = "20"

width = "100%"

bgcolor = ""

style = ""

script

end sub

private sub class_terminate

title  = ""

id = ""

menuitem = ""

end sub

public function additem(byval nitem, byval nurl)

menuitem = menuitem & "    " & nitem & "

"end function

public sub show()

menustr = "  " & title & "

" & menuitem & "

"if image<>"" then

menustr = replace(menustr, "", image)

else

menustr = replace(menustr, "", "")

end if

if headimage<>"" then

menustr = replace(menustr, "", headimage)

else

menustr = replace(menustr, "", "")

end if

response.write menustr

end sub

private function script()

dim jscript

jscript = ""

response.write jscript

end function

public sub addnew()

title  = ""

id = ""

menuitem = ""

menustr = ""

end sub

public sub openitem(byval itemid)

end sub

end class

%>

使用方法:

<%

dim newmenus

set newmenus = new menus

newmenus.target = "" '開啟方式

newmenus.bgcolor = "#336699" '主標籤背景色

newmenus.titlecolor = "#ffffff" '主標籤字型顏色

newmenus.height = "10px" '高度

newmenus.style ="a1" '子標籤樣式

newmenus.width = "100%" '選單寬度

newmenus.addnew

newmenus.title = "門戶**"

newmenus.id = "menu1"

newmenus.additem "網易", "

newmenus.title = "個人**"

"newmenus.additem "租用的空間", "

newmenus.title = "**新聞管理"

newmenus.id = "menu3"

newmenus.additem "新聞列表", "#"

newmenus.additem "新聞", "#"

newmenus.additem "新聞管理", "#"

newmenus.show

set newmenus = nothing

%>

vue elementUI實現側邊選單欄的功能

僅作記錄,上接上 class main style height 100vh yy 200px menu default active route.path class el menu vertical demo open handleopen close handleclose select ha...

寫乙個多級選單

public class menu implements comparable public int getmid public void setmid int mid public string getname public void setname string name public tree...

臨時加一條關於bootstrap的選單欄方面的

有些生疏,記住了 aria expanded表示展開狀態。預設為undefined,表示當前展開狀態未知。其它可選值 true表示元素是展開的 false表示元素不是展開的。aria hidden字串。可選值為true和false,true表示元素隱藏 不可見 false表示元素可見。aria hi...