这些基本是Dhtml的东西,下载个INet.chm,里面会有详细的例子

解决方案 »

  1.   

    http://www.lostinet.com/download/reference/inet.zip
      

  2.   

    主要知识点:
    getBoundingClientRect()//该元素的矩形集合
    getClientRects()//各行的矩形集合<HEAD>
    <SCRIPT>
    var rcts;
    var keyCount=0;function Highlight(obj) {            
        rcts = obj.getClientRects();//返回一个集合,元素为各行的矩形
        rctLength= rcts.length;//即得到有多少行
        if (keyCount > rctLength-1) {//判断是否过了长度
            idBeige.style.display="none";//如果是,隐藏idBeige
            keyCount = 0//下次从头开始
        }
        // set the rendering properties for the yellow DIV
        cdRight = rcts[keyCount].right + idBody.scrollLeft;//当前矩形的右边位置(相对于Body)加上Body的scrollLeft=实际的右边位置
        cdLeft = rcts[keyCount].left + idBody.scrollLeft;//同上
        cdTop = rcts[keyCount].top + idBody.scrollTop;//同上
        cdBottom = rcts[keyCount].bottom + idBody.scrollTop;//同上
        idYellow.style.top = cdTop;//设置top
        idYellow.style.width = (cdRight-cdLeft) - 5;//设置width
        idYellow.style.display = 'inline';//显示    // set the rendering properties for the beige DIV
        bndRight = obj.getBoundingClientRect().right +
        idBody.scrollLeft;//beige条的右边实际位置
        bndLeft = obj.getBoundingClientRect().left +
        idBody.scrollLeft;//beige条的左边实际位置
        bndTop = obj.getBoundingClientRect().top +
        idBody.scrollTop;//beige条的顶边实际位置
        idBeige.style.top = bndTop;//设置beige条top
        idBeige.style.width = (bndRight-bndLeft) - 5;//设置beige条Width
        idBeige.style.height = cdTop - bndTop;//两者差为“阅读过”的痕迹
        if (keyCount>0){
            idBeige.style.display = 'inline';//如果大于0,显示
        }
        keyCount++;//
    }
    </SCRIPT>
    </HEAD><BODY ID="idBody">
    <DIV ID="oID_1" onclick="Highlight(this)"
        onkeydown="Highlight(this)">
    A large block of text should go here. Click on this
    block of text multiple times to see each line
    highlight with every click of the mouse button.
    Once each line has been highlighted, the process
    will begin again starting with the first line.
    </DIV>
    <DIV STYLE="position:absolute; left:5; top:400;z-index:-1; background-color:yellow; display:none"
    ID="idYellow"></DIV>
    <DIV STYLE="position:absolute; left:5; top:400;z-index:-1; background-color:beige; display:none"
    ID="idBeige"></DIV>
    </BODY>
      

  3.   

    qiushuiwuhen(秋水无恨):
    谢谢,