好像是DIV层的隐藏和显示原理

解决方案 »

  1.   

    装一个翻译软件不就好了么!如:“雅虎有道”,“IBM词典”等等。
      

  2.   

    不难,呵呵.
    可能实现的有两种方式:
    1 利用ie html自带的属性.比如说 <a herf='xxx' alt='hello'>你好</a>.
    2 动态产生层,监听鼠标事件,onmouseover onmouseout ,onmouseover 在事件中动态创建层或者显示隐藏的层并调整层的显示位置,并且获取翻译. onmouseout 销毁层或者隐藏层.
      

  3.   

    lz指的应该是这种吧
    http://dict.hjenglish.com/w/php
      

  4.   

    <html>
    <head>
    <script>
    var $_text = '';
    (function(){
    document.onmousemove = function(){$_text = document.selection ? document.selection.createRange().text : window.getSelection(); }
    document.onmouseup = function(){if($_text!='')alert($_text)}
    })()
    </script>
    </head>
    <body>
    <div>hello world</div>
    check this simple example out
    </body>
    </html>