开发者

onmouseover and onmouseout don't work in firefox

I'm trying to change a CSS attribute by using a java-script function so This code is not working in firefox / works with Safari/Chrome

<html>
    <head>
        <style type="text/css">
         #hide {
            display: none ;
         }
        </style>
    </head>
    <body>
         <div onmouseover="document.getElementById('hide').style.display = 'compact';" onmouseout="document.getElementById('hide').style.display = 'none';" >
            Move Over Mouse here
         </div>
         <div id="hide"> THIS I开发者_如何学编程S HIDDEN TEXT</div>
    </body>
</html>

Any Ideas ?!


Try display style 'inline' rather than 'compact'.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜