A side menu bar written by ASP

Source: Internet
Author: User
Tags chr
Demo: http://goaler.xicp.net/demo/colspanmenu.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 & "<tr> <td style = 'font-size: 12px; 'align = 'left'> & nbsp; {$ Image} <a href = '"& nURL &" 'target =' "& target &" 'class = '"& Style &"'> "& nItem &" </a> </td> </tr>"
End Function
Public Sub Show ()
MenuStr = "<table border = 0 width = '" & Width & "'style = 'border: 1px solid #999999; 'bgcolor = '"& bgcolor &"'> <tr> <td height = '"& Height &" 'onclick = menus (' "& ID &"') bgcolor = '"& Bgcolor &" 'valign = 'bottom 'style = '"&_
"Font-size: 12px; color:" & TitleColor & "; cursor: hand; 'background = '" & background & "'align = 'left'> & nbsp; & nbsp; {$ HeadImage} "& Title &" </td> </tr> </table> <div id = "& chr (34) & ID & chr (34) & "style =" & chr (34 )&_
"Display: none;" & chr (34) & "> <table width = 100% border = 0 style = 'border-left: 1px solid #999999; border-right: 1px solid #999999; border-bottom: 1px solid #999999; '> "& menuItem &" </table> </div>"
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.