鼠标经过的字符都显示在状态栏上
发布时间:2008-12-20 12:36:59 阅读次数:
要完成此效果把如下代码加入到区域中
function doMouseMove() {
var tr = document.body.createTextRange();
tr.moveToPoint(event.clientX, event.clientY);
// Expand to the entire word under the mouse.
tr.expand("word");
window.status = tr.text;
}
document.onmousemove = doMouseMove;