用js的怎么样?固定在顶部的那种,和ie浏览器类似!!

解决方案 »

  1.   

    这是完整地浮动窗口
    利用层地浮动
    只要把里面地东东改为下拉菜单就可以了,一些参数自己重设一下<div id="KBStatic" style="position: absolute; left: 50; top: 0; width: 400; height: 45; z-index: 25">
    <embed src='Mp3/1207_2002920202.mp3' width=400 height=45 autostart=true loop=true>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
    <script language=JavaScript>
    function KB_keepItInIE(theName,theWantTop,theWantLeft)
    {
    theRealTop=parseInt(document.body.scrollTop)
    theTrueTop=theWantTop+theRealTop
    document.all[theName].style.top=theTrueTop
    theRealLeft=parseInt(document.body.scrollLeft)
    theTrueLeft=theWantLeft+theRealLeft
    document.all[theName].style.left=theTrueLeft
    }
    function KB_keepItInNN(theName,theWantX,theWantY)
    {
    theRealLay=document.layers[theName]
    theBadX=self.pageYOffset
    theBadY=self.pageXOffset
    theRealX=theBadX+theWantX
    theRealY=theBadY+theWantY
    theRealLay.moveTo(theRealY,theRealX)
    }
    IE4=(document.all)?1:0
    NN4=(document.layers)?1:0
    if (IE4)
    setInterval('KB_keepItInIE("KBStatic",0,50)',1)
    if (NN4)
    setInterval('KB_keepItInNN("KBStatic",0,50)',1)
    </script>
      

  2.   

    这个里面是一个real播放器,我怎么实现关闭层的功能?
      

  3.   

    在层上加个按钮:激发一个事件,把层隐藏(就实现关闭功能啦)
    display:none
      

  4.   

    当然可以了...下面给出隐藏的.显示是同理可得
    只要把display显示方式改一下即可
    <div id="KBStatic" style="position: absolute; left: 50; top: 0; width: 400; height: 45; z-index: 25;">
    <embed src='Mp3/1207_2002920202.mp3' width=400 height=45 autostart=true loop=true>&nbsp;<a href="#" onclick="javascript:self.KBStatic.style.display='none'">关闭</a></div>