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

帮看看DIV弹出窗口的问题
我想实现鼠标经过文字时弹出个DIV窗口,并且可以选择DIV窗口中的内容,当鼠标移出DIV窗口时该DIV窗口隐藏...可是写了隐藏事件以后发现鼠标无法移到DIV窗口了,应该怎么改才行啊?

<center>
<script>
function   Workhide_Com(sname){
if(sname.style.display== 'none '){

sname.style.display= ' ';
}else{

sname.style.display= 'none ';
}
}

function   hide(sname)
{
sname.style.display= 'none ';
}
</script>
<table   width= "200 "   border= "1 ">
    <tr>
        <td> <div   onMouseOver= "Workhide_Com(Workhide_Conent) "   > show   it </div>
            <div   onMouseOut= "hide(Workhide_Conent) "       id= "Workhide_Conent "   style= "display:none;border:1px   solid   black;width:300px;height:100px;   position:absolute;   background-color:#FFFFFF ">
                <style>
a:link,a:visited {   text-decoration:   none;   color:   #ddff11   }
a:hover {   text-decoration:   underline   ;   color:   #11ef11}
a.w:link,a.w:visited {   text-decoration:   none;   color:   #fa0011   }
a.w:hover {   text-decoration:   underline   ;   color:   #11adef}
</style>
                <a   href= "http://www.yahoo.com/ "> 我很丑,但我很温柔! </a>   <a   class= "w "   href= "http://www.excite.com/ "> 醒来后我依然是我!! </a> <br>
                <a   href= "http://www.yahoo.com/ "> 我很丑,但我很温柔! </a>   <a   class= "w "   href= "http://www.excite.com/ "> 醒来后我依然是我!! </a> <br>
                <a   href= "http://www.yahoo.com/ "> 我很丑,但我很温柔! </a>   <a   class= "w "   href= "http://www.excite.com/ "> 醒来后我依然是我!! </a> <br>
            </div> </td>
        <td> &nbsp; </td>
        <td> &nbsp; </td>
    </tr>
    <tr>
        <td> </td>
        <td> &nbsp; </td>
        <td> &nbsp; </td>
    </tr>
    <tr>
        <td> &nbsp; </td>
        <td> &nbsp; </td>
        <td> &nbsp; </td>
    </tr>
</table>


------解决方案--------------------
<center>
<script>
function Workhide_Com(sname){
if(sname.style.display== 'none '){

sname.style.display= ' ';

}else{

sname.style.display= 'none ';
}
}

function hide(sname)
{
sname.style.display= 'none ';
}
</script>
<table width= "200 " border= "1 ">
<tr>
<td>