- Code:
<a href = 'http://xyz/?'>Sản Phẩm 1</a>
<div Style='xyz; display:none; position:absolute'> Info 12356234565</div>
<script>
document.getElementById('SP1').onmousemove= function(){
var pos = getMousePosition();
pos.x = document.body.scrollLeft + pos.x;
pos.y = document.body.scrollTop + pos.y;
var divinfo = document.getElementById('SP1Info')
divinfo.style.display = "block";
divinfo.style.left = pos.x + "px";
divinfo.style.left = pos.y + "px";
}
document.getElementById('SP1').onmouseout = function()
{
var divinfo = document.getElementById('SP1Info')
divinfo.style.display= "none";
}
</script>
code khi rê chuột lên sản phẩm nhiều trang nó hiện thông tin lên như 1 form
Giới tính :
Đến từ : TPHCM
Ngày Tham gia : 03/04/2011
Tổng số bài gửi : 2292
|
|