www.blueidea.com/bbs/NewsDetail.asp?id=251048www.blueidea.com/bbs/NewsDetail.asp?id=263438

解决方案 »

  1.   

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
    <HEAD>
    <TITLE> New Document </TITLE>
    <META NAME="Generator" CONTENT="EditPlus">
    <META NAME="Author" CONTENT="">
    <META NAME="Keywords" CONTENT="">
    <META NAME="Description" CONTENT="">
    </HEAD><BODY>
    <SCRIPT LANGUAGE="javascript">
    function scroll(n)
    {
    temp=n;
    Out1.scrollTop=Out1.scrollTop+temp;
    window.setTimeout("scroll(temp)",80);
    if (temp==0) return;
    }
    </SCRIPT>
    <TABLE WIDTH="330">
    <TR>
     <TD WIDTH="304" VALIGN="TOP" ROWSPAN="2" >
      <DIV ID=Out1 style="width:100%; height:100;overflow: hidden;border-style:    dashed;border-width: 1px,1px,1px,1px;">
       外交部发言人:中国坚决反对陈水扁“过境”休斯敦  石广生谈亚太经合组
    织贸易部长会议   国家质检总局公布近期查处的15起案值超百万元的大案要
    案   尼泊尔新国王下令对王宫枪击事件进行全面调查   网站专稿:美丽的
    西藏 真情的演绎 《文成公主》惹人爱   网站特稿:尼泊尔王室灭门惨案——
    谁扣动了扳机?   外交部发言人:中国坚决反对陈水扁“过境”休斯敦  石广
    生谈亚太经合组贸易部长会议   国家质检总局公布近期查处的15起案值超百
    万元的大案要案  尼泊尔新国王下令对王宫枪击事件进行全面调查   网站专
    稿:美丽的西藏 真情的演绎 《文成公主》惹人爱   网站特稿:尼泊尔王室
    灭门惨案——谁扣动了扳机?</DIV>
     </TD>
     <TD WIDTH="16" VALIGN="TOP">
      <IMG SRC="photo/up0605.gif" WIDTH="14" HEIGHT="20" onmouseover="
    scroll(-1)"  onmouseout="scroll(0)" onmousedown="scroll(-2)" 
    BORDER="0" ALT="按下鼠标速度会更快!"></TD>
    </TR> <TR> <TD WIDTH="14" VALIGN="BOTTOM">
      <IMG SRC="photo/down0605.gif" onmouseover="scroll(1)" onmouseout
    ="scroll(0)"  onmousedown="scroll(2)" BORDER="0" WIDTH="15" HEIGHT
    ="21" ALT="按下鼠标速度会更快!"></TD> </TR> </TABLE></BODY>
    </HTML>
      

  2.   

    谢谢楼上的两位大哥现在有个问题
    longshenwang(独眼龙) 提供的怎么加个滑块 和一个背景画线
      

  3.   

    <HTML><HEAD><TITLE>完全滚动条</TITLE>
    <SCRIPT language=javascript>
    var speed =5;
    var mouseY;
    var mouseX;
    var clickUp=false;
    var clickDown=false;
    var clickDrag=false;
    var clickAbove = false;
    var clickBelow = false;
    var timer = setTimeout("",500);
    var dragL;
    var dragT;
    var rulerL;
    var rulerT;
    var contentT;
    var contentH;
    var contentClipH;
    var scrollLength;
    var startY;
    var scrollH;
    var dragH;
    var dragW;function down(e){
    if((document.all&&event.button!=1)) return true;
    getMouse(e);
    startY=(mouseY-dragT);
    if(mouseX>=dragL&&(mouseX<=(dragL+dragW))&&mouseY>=dragT&&(mouseY<=(dragT+dragH))){
         clickDrag=true;
         return false;
    }
    else if(mouseX>=dragL&&(mouseX<=(dragL+dragW))&&mouseY>=rulerT&&(mouseY<=(rulerT+scrollH))){
         if (mouseY<dragT){
    clickAbove=true;
    clickUp=true;
    return scrollUp();
         }
         else {
    clickBelow=true;
    clickDown=true;
    return scrollDown();
         }
    }
    else{
         return true;
    }
    }function move(e){
    if (clickDrag&&contentH>contentClipH){
       getMouse(e);
       dragT=(mouseY-startY);
       if (dragT<(rulerT)) dragT=rulerT;
       if (dragT>(rulerT+scrollH-dragH)) dragT=(rulerT+scrollH-dragH);
       contentT=((dragT-rulerT)*(1/scrollLength));
       contentT=eval('-'+contentT);
       moveTo();
    }
    return false;
    }function up(){
            clearTimeout(timer);
    clickUp=false;
    clickDown=false;
    clickDrag=false;
    clickAbove=false;
    clickBelow=false;
    return true;
    }function getT(){
    contentT=document.all.content.style.pixelTop;
    }function getMouse(e){
    mouseY=event.clientY;
    mouseX=event.clientX;
    }function moveTo(){
            with (document.all) {
         content.style.top=contentT;
         ruler.style.top=dragT;
         drag.style.top=dragT;
    }
    }function scrollUp(){
    getT();
    if (clickAbove){
       if (dragT<=(mouseY-(dragH/2))) return up();
    }
    if (clickUp){
       if (contentT<0){
       dragT=dragT-(speed*scrollLength);
       if (dragT<(rulerT)) dragT=rulerT;
       contentT=contentT+speed;
       if (contentT>0) contentT=0;
       moveTo();
       timer=setTimeout("scrollUp()",25);
    }
    }
    return false;
    }function scrollDown(){
    getT();
    if (clickBelow){
       if (dragT>=(mouseY-(dragH/2))) return up();
    }
    if (clickDown){
       if (contentT>-(contentH-contentClipH)){
    dragT=dragT+(speed*scrollLength);
    if (dragT>(rulerT+scrollH-dragH)) dragT=(rulerT+scrollH-dragH);
    contentT=contentT-speed;
    if (contentT<-(contentH-contentClipH)) contentT=-(contentH-contentClipH);
    moveTo();
    timer=setTimeout("scrollDown()",25);
        }
    }
    return false;
    }function eventLoader(){
    with (document.all) {
    dragL=drag.style.pixelLeft;
    dragT=drag.style.pixelTop;
    rulerT=ruler.style.pixelTop;
    contentH=content.offsetHeight;
    contentClipH=contentClip.offsetHeight;
    dragH=parseInt(drag.style.height);
    dragW=parseInt(drag.style.width);
    scrollH=parseInt(scroll.style.height);
    if (contentH<=contentClipH) {
       drag.style.visibility="hidden"
       ruler.style.visibility="hidden"
       scroll.style.visibility="hidden"
       return true;
    }
    }
    scrollLength=((scrollH-dragH)/(contentH-contentClipH));
    document.onmousedown=down;
    document.onmousemove=move;
    document.onmouseup=up;
    }
    </SCRIPT>
    <STYLE type=text/css>
    TD {FONT-SIZE: 9pt; FONT-FAMILY: "宋体"}
    </STYLE>
    </HEAD>
    <BODY  topMargin=0 onload=eventLoader(); marginheight=0 marginwidth=0>
    <DIV id=drag style="Z-INDEX:5;LEFT:313px;VISIBILITY:visible;WIDTH:12px;POSITION:absolute;TOP:1px;HEIGHT:13px"><IMG height=13 src="images/scrollbar.gif" width=12></DIV>
    <DIV id=ruler style="Z-INDEX:6;LEFT:249px;VISIBILITY:visible;WIDTH:12px;POSITION:absolute;TOP:1px;HEIGHT:13px"></DIV>
    <DIV id=contentClip style="Z-INDEX:7;border:solid 1px #000000;LEFT:1px;VISIBILITY:visible;OVERFLOW:hidden;WIDTH:312px;CLIP:rect(0px 312px 205px 0px);POSITION:absolute;TOP:1px;HEIGHT:205px">
    <DIV id=content style="WIDTH:312px;LEFT:0px;VISIBILITY:visible;POSITION:absolute;">
    <DIV align=left>
    <TABLE cellSpacing=0 cellPadding=0 width=307 border=0>
    <TR><TD width=245>
    <TABLE cellSpacing=1 cellPadding=0 width=300 border=0>
    <TR><TD width=300 background=images/go6.gif height=2><IMG height=8 src="images/go5.gif" width=8>2001/9/11</TD></TR>
    <TR><TD width=300>呵呵,今天美国被炸,刚好我在做心情复杂.</TD></TR>
    <TR><TD width=300 background=images/go6.gif><IMG height=8 src="images/go5.gif" width=8>2001/9/12</TD></TR>
    <TR><TD width=300 height=18>昨晚看电视看到早上快5点,好累.</TD></TR>
    <TR><TD width=300>在公司里一整天都在看关于美国的事.</TD></TR>
    <TR><TD width=300 background=images/go6.gif><IMG height=8 src="images/go5.gif" width=8>2001/9/13</TD></TR>
    <TR><TD width=300>今天一整天忙着公司的改版,忙......</TD></TR>
    <TR><TD width=300 background=images/go6.gif height=2><IMG height=8 src="images/go5.gif" width=8>2001/9/11</TD></TR>
    <TR><TD width=300>呵呵,今天美国被炸,刚好我在做心情复杂.</TD></TR>
    <TR><TD width=300 background=images/go6.gif><IMG height=8 src="images/go5.gif" width=8>2001/9/12</TD></TR>
    <TR><TD width=300 height=18>昨晚看电视看到早上快5点,好累.</TD></TR>
    <TR><TD width=300>在公司里一整天都在看关于美国的事.</TD></TR>
    <TR><TD width=300 background=images/go6.gif><IMG height=8 src="images/go5.gif" width=8>2001/9/13</TD></TR>
    <TR><TD width=300>今天一整天忙着公司的改版,忙......</TD></TR>
    <TR><TD width=300>呵呵,今天美国被炸,刚好我在做心情复杂.</TD></TR>
    <TR><TD width=300 background=images/go6.gif><IMG height=8 src="images/go5.gif" width=8>2001/9/12</TD></TR>
    <TR><TD width=300 height=18>昨晚看电视看到早上快5点,好累.</TD></TR>
    <TR><TD width=300>在公司里一整天都在看关于美国的事.</TD></TR>
    <TR><TD width=300 background=images/go6.gif><IMG height=8 src="images/go5.gif" width=8>2001/9/13</TD></TR>
    <TR><TD width=300>今天一整天忙着公司的改版,忙......</TD></TR>
    </TABLE>
    </TD><TD width=4></TD></TR></TABLE></DIV></DIV></DIV>
    <DIV id=scroll style="LEFT:313px;POSITION:absolute;WIDTH:12px;TOP:1px;HEIGHT:205px"><IMG height=205 src="images/scroll.gif" width=12></DIV>
    </BODY></HTML>