熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> .NET編程 >> 正文

ASP.NET AJAX 4.0 Preview 1

2022-06-13   來源: .NET編程 

  JAVA腳本寫的主要過程效果不錯但在net下不能運行!

  <html>
        <head>
        <meta httpequiv=ContentType content=text/html; charset=gb>
        <title>導航菜單</title>
        <style type=text/css>
        titleStyle{
        backgroundcolor:#;color:#ffffff;bordertop:px solid #FFFFFF;fontsize:pt;cursor:hand;
        }
       ntentStyle{
        backgroundcolor:#eeffee;color:blue;fontsize:pt;
        }
        a{
        color:blue;
        }
        body{
        fontsize:pt;
        }
        </style>
        </head>
        <body>
        <script language=JavaScript>
        <!
        var layerTop=;       //菜單頂邊距
        var layerLeft=;      //菜單左邊距
        var layerWidth=;    //菜單總寬
        var titleHeight=;    //標題欄高度
        var contentHeight=; //內容區高度
        var stepNo=;         //移動步數數值越大移動越慢
        var itemNo=;runtimes=;
        documentwrite(<span id=itemsLayer >);
        function addItem(itemTitleitemContent){
           itemHTML=<div id=item+itemNo+ itemIndex=+itemNo+ ><table width=% cellspacing= cellpadding=>+
               <tr><td height=+titleHeight+ onclick=changeItem(+itemNo+) class=titleStyle align=center>+itemTitle+</td></tr>+
               <tr><td height=+contentHeight+ class=contentStyle>+itemContent+</td></tr></table></div>;
           documentwrite(itemHTML);
           itemNo++;
         }
        //添加菜單標題和內容可任意多項注意格式
        addItem(歡迎<BR><img src=hehegif/>);
        addItem(網頁陶吧<center><a #>網頁工具</a> <BR><BR><a #>技術平台</a> <BR><BR><a #>設計理念</a> <BR><BR><a #>更多</a></center>);
        addItem(美工教室<center><a #>平面設計 </a> <BR><BR><a #>三維空間</a> <BR><BR><a #>設計基礎</a> <BR><BR><a #>更多</a></center>);
        addItem(Flash<center><a #>基礎教程</a> <BR><BR><a #>技巧運用</a> <BR><BR><a #>實例剖析</a> <BR><BR><a #>更多</a></center>);
        addItem(多媒體<center><a #>DIRECTOR</a> <BR><BR><a #>Authorware</a> <BR><BR><a #>更多</a></center>);
        addItem(精品賞析<center><a #>設計精品</a></center>);
        documentwrite(</span>)
        emsLayerstyleheight=itemNo*titleHeight+contentHeight;
        toItemIndex=itemNo;onItemIndex=itemNo;
        function changeItem(clickItemIndex){
           toItemIndex=clickItemIndex;
           if(toItemIndexonItemIndex>) moveUp(); else moveDown();
           runtimes++;
           if(runtimes>=stepNo){
             onItemIndex=toItemIndex;
             runtimes=;}
           else
             setTimeout(changeItem(toItemIndex));
         }
         function moveUp(){
           for(i=onItemIndex+;i<=toItemIndex;i++)
             eval(em+i+styletop=parseInt(em+i+styletop)contentHeight/stepNo;);
         }
         function moveDown(){
           for(i=onItemIndex;i>toItemIndex;i)
             eval(em+i+styletop=parseInt(em+i+styletop)+contentHeight/stepNo;);
         }
         changeItem();
        //>
        </script>
        </body>


From:http://tw.wingwit.com/Article/program/net/201311/12186.html
    推薦文章
    Copyright © 2005-2022 電腦知識網 Computer Knowledge   All rights reserved.