鼠標經(jīng)過的字符都顯示在狀態(tài)欄上
發(fā)布時間:2008-12-20 閱讀數(shù): 次 來源:網(wǎng)樂原科技
要完成此效果把如下代碼加入到區(qū)域中
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;