根据鼠标位置悬浮DIV
function showNone() {
document.getElementById('div1').style.display = "none";
}
function showBlock() {
document.getElementById('div1').style.top =????;
document.getElementById('div1').style.left =????;
document.getElementById('div1').style.display = "block";
}
有个DIV,一个a标签,上面的是js脚本,想获取鼠标的坐标
根据鼠标的位置显示DIV,求解。。。
假如说图片靠右边,div宽度超出页面,怎么让他在左边显示?
求代码
有个例子http://jquery.bassistance.de/tooltip/demo/