<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    ★33°空間‰


                           ----★七彩服飾  【最潮拜☆日單精品】【Esprit】【Hotwind】滿150包郵-女裝-流行女裝    www.7color.hb.cn

                           ----智力比知識重要,素質比智力重要,覺悟比素質更重要
    posts - 110,comments - 35,trackbacks - 0


    步驟:
    1.新建一個頁面,假如說叫VerticalMenu
    2.把html代碼copy到html代碼區
    3.把LoadTopMenu方法copy到cs代碼區
    4.運行即可
    -------------------------------------
    1.html代碼

    < STYLE? type ="text/css" >
    ????A:link?
    { ?COLOR : ?#000000 ; ?FONT-SIZE : ?12px ; ?TEXT-DECORATION : ?none }
    ????A:visited?
    { ?COLOR : ?#000000 ; ?FONT-SIZE : ?12px ; ?TEXT-DECORATION : ?none }
    ????A:hover?
    { ?COLOR : ?#006CD9 ; ?FONT-SIZE : ?12px ; ?TEXT-DECORATION : ?none }
    ????BODY?
    { ?FONT-SIZE : ?12px ; }
    ????TD?
    { ?FONT-SIZE : ?12px ; ?line-height : ?150% }
    </ STYLE >
    < script? language ="JavaScript" >
    <!--
    function ?showitem(id,name)
    {
    ????
    // 打開彈出式頁面

    ???? // return?("<span><a?href='"+id+"'?target=_blank>"+name+"</a></span><br>")
    ???? // 在框架中打開
    ???? return ?( " <span><a?href='#'?onclick=\ " url(' " +id+ " ');\ " > " + name + " </a></span><br> " )
    }

    function ?url(id)
    {
    ????
    var ?source? =
    ?document.getElementById('fMain');
    ????source.src
    =
    id;
    }

    function ?switchoutlookBar(number)
    {
    ????
    var ?i? =
    ?outlookbar.opentitle;
    ????outlookbar.opentitle
    =
    number;
    ????
    var
    ?id1,id2,id1b,id2b
    ????
    if ?(number != i? && ?outlooksmoothstat == 0 )
    {
    ????????
    if ?(number !=- 1
    )
    ????????
    {
    ????????????
    if ?(i ==- 1 )
    {
    ????????????????id2
    = " blankdiv "
    ;
    ????????????????id2b
    = " blankdiv "
    ;
    ????????????}

    ????????????
    else {
    ????????????????id2
    = " outlookdiv " +
    i;
    ????????????????id2b
    = " outlookdivin " +
    i;
    ????????????????document.all(
    " outlooktitle " + i).style.border = " 1px?none?navy "
    ;
    ????????????????document.all(
    " outlooktitle " + i).style.background =
    outlookbar.maincolor;
    ????????????????document.all(
    " outlooktitle " + i).style.color = " #ffffff "
    ;
    ????????????????document.all(
    " outlooktitle " + i).style.textalign = " center "
    ;
    ????????????}

    ????????????id1
    = " outlookdiv " + number
    ????????????id1b
    = " outlookdivin " +
    number
    ????????????document.all(
    " outlooktitle " + number).style.border = " 1px?none?white "
    ;
    ????????????document.all(
    " outlooktitle " + number).style.background = outlookbar.maincolor;? // title

    ????????????document.all( " outlooktitle " + number).style.color = " #ffffff " ;
    ????????????document.all(
    " outlooktitle " + number).style.textalign = " center "
    ;
    ????????????smoothout(id1,id2,id1b,id2b,
    0
    );
    ????????}

    ????????
    else
    ????????
    {
    ????????????document.all(
    " blankdiv " ).style.display = ""
    ;
    ????????????document.all(
    " blankdiv " ).sryle.height = " 100% "
    ;
    ????????????document.all(
    " outlookdiv " + i).style.display = " none "
    ;
    ????????????document.all(
    " outlookdiv " + i).style.height = " 0% "
    ;
    ????????????document.all(
    " outlooktitle " + i).style.border = " 1px?none?navy "
    ;
    ????????????document.all(
    " outlooktitle " + i).style.background =
    outlookbar.maincolor;
    ????????????document.all(
    " outlooktitle " + i).style.color = " #ffffff "
    ;
    ????????????document.all(
    " outlooktitle " + i).style.textalign = " center "
    ;
    ????????}

    ????}

    }

    function ?smoothout(id1,id2,id1b,id2b,stat)
    {
    ????
    if (stat == 0 )
    {
    ????????tempinnertext1
    =
    document.all(id1b).innerHTML;
    ????????tempinnertext2
    =
    document.all(id2b).innerHTML;
    ????????document.all(id1b).innerHTML
    = ""
    ;
    ????????document.all(id2b).innerHTML
    = ""
    ;
    ????????outlooksmoothstat
    = 1
    ;
    ????????document.all(id1b).style.overflow
    = " hidden "
    ;
    ????????document.all(id2b).style.overflow
    = " hidden "
    ;
    ????????document.all(id1).style.height
    = " 0% "
    ;
    ????????document.all(id1).style.display
    = ""
    ;
    ????????setTimeout(
    " smoothout(' " + id1 + " ',' " + id2 + " ',' " + id1b + " ',' " + id2b + " ', " + outlookbar.inc + " ) "
    ,outlookbar.timedalay);
    ????}

    ????
    else
    ????
    {
    ????????stat
    +=
    outlookbar.inc;
    ????????
    if ?(stat > 100
    )
    ????????????stat
    = 100
    ;
    ????????document.all(id1).style.height
    = stat + " % "
    ;
    ????????document.all(id2).style.height
    = ( 100 - stat) + " % "
    ;
    ????????
    if ?(stat < 100
    )?
    ????????????setTimeout(
    " smoothout(' " + id1 + " ',' " + id2 + " ',' " + id1b + " ',' " + id2b + " ', " + stat + " ) "
    ,outlookbar.timedalay);
    ????????
    else

    ????????
    {
    ????????????document.all(id1b).innerHTML
    =
    tempinnertext1;
    ????????????document.all(id2b).innerHTML
    =
    tempinnertext2;
    ????????????outlooksmoothstat
    = 0
    ;
    ????????????document.all(id1b).style.overflow
    = " auto "
    ;
    ????????????document.all(id2).style.display
    = " none "
    ;
    ????????}

    ????}

    }

    function ?getOutLine()
    {
    ????outline
    = " <table? " + outlookbar.otherclass + " > "
    ;
    ????
    for ?(i = 0 ;i < (outlookbar.titlelist.length);i ++
    )
    ????
    {
    ????????outline
    += " <tr><td?name=outlooktitle " + i + " ?id=outlooktitle " + i + " ? "
    ;?
    ????????
    if ?(i !=
    outlookbar.opentitle)?
    ????????????outline
    += " ?nowrap?align=center?style='cursor:hand;background-color: " + outlookbar.maincolor + " ;color:#ffffff;height:20;border:1?none?navy'? "
    ;
    ????????
    else

    ????????????outline
    += " ?nowrap?align=center?style='cursor:hand;background-color: " + outlookbar.maincolor + " ;color:white;height:20;border:1?none?white'? " ;
    ????????outline
    +=
    outlookbar.titlelist[i].otherclass
    ????????outline
    += " ?onclick='switchoutlookBar( " + i + " )'><span?class=smallFont> "
    ;
    ????????outline
    += outlookbar.titlelist[i].title + " </span></td></tr> "
    ;
    ????????outline
    += " <tr><td?name=outlookdiv " + i + " ?valign=top?align=center?id=outlookdiv " + i + " ?style='width:100% "

    ????????
    if ?(i != outlookbar.opentitle)?
    ????????????outline
    += " ;display:none;height:0%; "
    ;
    ????????
    else

    ????????????outline
    += " ;display:;height:100%; " ;
    ????????outline
    += " '><div?name=outlookdivin " + i + " ?id=outlookdivin " + i + " ?style='overflow:auto;width:100%;height:100%'> "
    ;
    ????????
    for ?(j = 0 ;j < outlookbar.itemlist[i].length;j ++
    )
    ????????????outline
    +=
    showitem(outlookbar.itemlist[i][j].key,outlookbar.itemlist[i][j].title);
    ????????outline
    += " </div></td></tr> "

    ????}

    ????outline
    += " </table> "
    ????
    return ?outline
    }

    function ?show()
    {
    ????
    var
    ?outline;
    ????outline
    = " <div?id=outLookBarDiv?name=outLookBarDiv?style='width=100%;height:100%'> "

    ????outline
    += outlookbar.getOutLine();
    ????outline
    += " </div> "

    ????document.write(outline);
    }

    function ?theitem(intitle,instate,inkey)
    {
    ????
    this .state =
    instate;
    ????
    this .otherclass = " ?nowrap? "
    ;
    ????
    this .key =
    inkey;
    ????
    this .title =
    intitle;
    }

    function ?addtitle(intitle)
    {
    ????outlookbar.itemlist[outlookbar.titlelist.length]
    = new
    ?Array();
    ????outlookbar.titlelist[outlookbar.titlelist.length]
    = new ?theitem(intitle, 1 , 0
    );
    ????
    return (outlookbar.titlelist.length - 1
    );
    }

    function ?additem(intitle,parentid,inkey)
    {
    ????
    if ?(parentid >= 0 ? && ?parentid <=
    outlookbar.titlelist.length)
    ????
    {
    ????????outlookbar.itemlist[parentid][outlookbar.itemlist[parentid].length]
    = new ?theitem(intitle, 2
    ,inkey);
    ????????outlookbar.itemlist[parentid][outlookbar.itemlist[parentid].length
    - 1 ].otherclass = " ?nowrap?align=left?style='height:5'? "
    ;
    ????????
    return (outlookbar.itemlist[parentid].length - 1
    );
    ????}

    ????
    else
    ????????additem
    =- 1 ;
    }

    function ?outlook()
    {
    ????
    this .titlelist = new
    ?Array();
    ????
    this .itemlist = new
    ?Array();
    ????
    this .divstyle = " style='height:100%;width:100%;overflow:auto'?align=center " ; // 可以在這里設置對齊方式

    ???? this .otherclass = " border=0?cellspacing='0'?cellpadding='0'?style='height:100%;width:100%'valign=middle?align=center? " ;
    ????
    this .addtitle =
    addtitle;
    ????
    this .additem =
    additem;
    ????
    this .starttitle =- 1
    ;
    ????
    this .show =
    show;
    ????
    this .getOutLine =
    getOutLine;
    ????
    this .opentitle = this
    .starttitle;
    ????
    this .reflesh =
    outreflesh;
    ????
    this .timedelay = 50
    ;
    ????
    this .inc = 10
    ;
    ????
    this .maincolor? = ? " #336699 "

    }

    function ?outreflesh()
    {
    ????document.all(
    " outLookBarDiv " ).innerHTML =
    outlookbar.getOutLine();
    }

    function ?locatefold(foldname)
    {
    ????
    if ?(foldname == ""
    )
    ????????foldname?
    = ?outlookbar.titlelist[ 0
    ].title
    ????
    for ?( var ?i = 0 ;i < outlookbar.titlelist.length;i ++
    )
    ????
    {
    ????????
    if (foldname ==
    outlookbar.titlelist[i].title)
    ????????
    {
    ????????????outlookbar.starttitle
    =
    i;
    ????????????outlookbar.opentitle
    =
    i;
    ????????}

    ????}

    }

    var ?outlookbar = new ?outlook();
    var
    ?tempinnertext1,tempinnertext2,outlooksmoothstat
    outlooksmoothstat?
    = ? 0
    ;

    <%= LoadVerticalMenu() %> // 從數據庫產生垂直菜單


    // -->
    </ script >
    < table? id ="mnuList" ?style ="WIDTH:150px;HEIGHT:?100%" ?cellspacing ="0" ?cellpadding ="0" ?align ="left"
    ????border
    ="0" >
    ????
    < tr >
    ????????
    < td? bgcolor ="#F0F0E5" ?id ="outLookBarShow" ?style ="HEIGHT:?100%" ?valign ="top" ?align ="middle"
    ????????????name
    ="outLookBarShow" >
    ????????????
    < script? language ="JavaScript" >
    ????????????
    <!--
    ????????????locatefold(
    "" )
    ????????????outlookbar.show()?
    ????????????
    // -->

    ????????????
    </ script >
    ????????
    </ td >
    ????
    </ tr >
    </ table >
    2.cs代碼
    public ? class ?VerticalMenu?:?System.Web.UI.Page
    {
    ????
    protected
    ?DataRow[]?father;
    ????
    protected
    ?DataRow[]?first;
    ????????
    private ? void ?Page_Load( object
    ?sender,?System.EventArgs?e)
    ????????
    {
    ????????????
    // ?模擬QQ菜單

    ????????}

    ????
    public ? static ? string ?ConnectionString = System.Configuration?.ConfigurationSettings?.AppSettings[ " ConnectionString " ];
    ????
    ???????
    GetDataSet

    ????
    protected ? string ?LoadVerticalMenu()
    ????
    {
    ????
    string ?sqlFather = " select?*?from?PowerSetting "
    ;
    ????DataSet?dsFather
    =
    GetDataSet(sqlFather);
    ????father
    = dsFather.Tables[ 0 ].Select( " IsBoot=0 " , " IsBoot "
    );
    ????
    string ?menu = ""
    ;????????????
    ????
    foreach (DataRow?drfather? in
    ?father)
    ????
    {
    ????????menu
    += " var?t; "
    ;
    ????????menu
    += " t=outlookbar.addtitle(' " + drfather[ " Description " ] + " '); "
    ;
    ????????first
    = dsFather.Tables[ 0 ].Select( " ParentID=' " + Convert.ToInt32(drfather[ " ParentID " ]) + " '?and?IsBoot=1 " , " IsBoot "
    );
    ????????
    foreach (DataRow?drfirst? in
    ?first)
    ????????
    {
    ????????????menu
    += " outlookbar.additem(' " + drfirst[ " Description " ] + " ',t,' " + drfirst[ " Url " ] + " '); "
    ;
    ????????}

    ????}

    ????
    return ?menu;
    ????}

    ????????
    Web?Form?Designer?generated?code
    ????}

    3.數據庫腳本
    if ? exists ?( select ? * ? from ?dbo.sysobjects? where ?id? = ? object_id (N ' [dbo].[PowerSetting] ' )? and ? OBJECTPROPERTY (id,?N ' IsUserTable ' )? = ? 1 )
    drop ? table ? [ dbo ] . [ PowerSetting ]

    GO

    CREATE ? TABLE ? [ dbo ] . [ PowerSetting ] ?(
    ????
    [ PowerSettingID ] ? [ int ] ? IDENTITY ?( 1 ,? 1 )? NOT ? NULL ?,???????????? -- id

    ???? [ ParentID ] ? [ int ] ? NOT ? NULL ?,???????????????????????? -- 父節點id
    ???? [ Description ] ? [ nvarchar ] ?( 255 )?COLLATE?Chinese_PRC_CI_AS? NULL ?,???? -- 菜單描述內容
    ???? [ Icon ] ? [ nvarchar ] ?( 50 )?COLLATE?Chinese_PRC_CI_AS? NULL ?,???????? -- 要顯示圖標
    ???? [ Url ] ? [ nvarchar ] ?( 255 )?COLLATE?Chinese_PRC_CI_AS? NULL ?,???????? -- url
    ???? [ Target ] ? [ nvarchar ] ?( 50 )?COLLATE?Chinese_PRC_CI_AS? NULL ?,???????? -- _self,_blank等
    ???? [ CreateByID ] ? [ nvarchar ] ?( 50 )?COLLATE?Chinese_PRC_CI_AS? NULL ?,???? -- 創建人id
    ???? [ CreateON ] ? [ datetime ] ? NULL ?,???????????????????? -- 創建日期
    ???? [ IsEnabled ] ? [ bit ] ? NULL ?,???????????????????????? -- 是否可用
    ???? [ IsBoot ] ? [ int ] ? NULL ????????????????????????? -- 是不是根節點;1是其他不是
    )? ON ? [ PRIMARY ]
    GO


    ?

    posted on 2006-09-20 12:52 圣域飛俠 閱讀(489) 評論(0)  編輯  收藏 所屬分類: C#文章
    主站蜘蛛池模板: 亚洲一卡二卡三卡| 亚洲最新视频在线观看| 97在线线免费观看视频在线观看| 无码国产精品一区二区免费3p| 在线成人精品国产区免费| 114级毛片免费观看| 日本免费一区尤物| 亚洲午夜成人精品电影在线观看| 亚洲精品无码永久中文字幕| 亚洲第一成年人网站| 一级成人生活片免费看| 精品熟女少妇a∨免费久久| 国产一卡二卡≡卡四卡免费乱码| 亚洲国产精品成人AV无码久久综合影院| 亚洲永久精品ww47| 亚洲人成77777在线播放网站不卡 亚洲人成77777在线观看网 | 成年免费a级毛片| 99re6免费视频| 亚洲AV无码专区日韩| 大片免费观看92在线视频线视频| 亚洲精品国精品久久99热| 亚洲AV无码精品蜜桃| 在线观看人成视频免费| 久久久久亚洲AV无码专区首| 亚洲人成色4444在线观看| 国产成人免费ā片在线观看老同学| 国产精一品亚洲二区在线播放| 99re视频精品全部免费| 亚洲欧洲无码一区二区三区| 亚洲第一区精品观看| 免费在线观看一级片| 久久精品亚洲乱码伦伦中文| 亚洲AV电影天堂男人的天堂| 中文字幕免费视频一| 亚洲欧美日韩中文字幕一区二区三区| 国产免费av片在线播放| 男女午夜24式免费视频 | 91精品国产亚洲爽啪在线观看| 美女被免费网站91色| 青青青国产色视频在线观看国产亚洲欧洲国产综合 | 午夜肉伦伦影院久久精品免费看国产一区二区三区 |