日期:2014-05-16  浏览次数:20335 次

帮看看这样的效果是怎么做的??
网站是:http://bt3.btchina.net/

效果就是鼠标移到相关记录时候能弹出个框,而且这个框是里的内容是选的,就和你操作另外一个网页一样。怎么实现???

------解决方案--------------------
做了个例子,希望是lz想要的效果
<html>
<head>
<meta http-equiv= "Content-Type " content= "text/html; charset=gb2312 ">
<title> new page </title>
<script>
function m_over(obj){
var hid=document.getElementById( "hid ");
if(hid.value!= " "){
var divObj=document.getElementById(hid.value);
document.body.removeChild(divObj);
}
var newDiv=document.createElement( "div ");
newDiv.id=obj.id+ "_div ";
hid.value=obj.id+ "_div ";
newDiv.innerHTML=obj.innerText+ " <br> aaaaaaaa <br> bbbbbbbbb <br> cccccccccc ";
newDiv.style.position= "absolute ";
newDiv.style.top=event.y;
newDiv.style.left=event.x;
newDiv.style.backgroundColor= "#cccccc ";
document.body.appendChild(newDiv);
}
</script>
</head>
<body>
<span id=s1 onmouseover= "m_over(this) "> 标题1 </span> <br>
<span id=s2 onmouseover= "m_over(this) "> 标题2 </span> <br>
<span id=s3 onmouseover= "m_over(this) "> 标题3 </span>
<input id=hid type=hidden value= " ">
</body>
</html>