【发布时间】:2014-02-10 11:34:01
【问题描述】:
<input id="button" type="button" value="Expand" onclick="showMore()">
<div id="d3">
<div class="button12" onclick="document.location='#'">Home</div>
<div class="button12" onclick="document.location='#'">About</div>
<div id="d1">
<input type="button" value="Shrink" onclick="showLess()">
</div>
<script type="text/javascript">//<![CDATA[
var button = document.getElementById("button");
var d3 = document.getElementById("d3");
function showMore() {
button.style.display="none";
d3.style.display="block";
}
function showLess() {
button.style.display="inline-block";
d3.style.display="none";
}
//]]>
</script>
如何将onclick="showMore()" 更改为hover..?
我需要它在不点击的情况下显示。
【问题讨论】:
-
使用一些 CSS 代码制作悬停样式
-
onmouseover="showMore()"没用?
标签: javascript php jquery html css