<script>
window.onload=function(){
document.onmousemove=function (ev)
{
var oEvent=ev||event;
var oDiv=document.getElementById('div1'); oDiv.style.left=oEvent.clientX+'px';
oDiv.style.top=oEvent.clientY+'px';
};
}
</script>

不要忘记给跟随的标签设置绝对定位

04-14 00:03