<style>
.btn{width:60px;height:25px;padding-top:3px;border:1px solid #999999;background:#f0f0f0; cursor:hand;}
.showmid{
 visibility:visible;
 overflow: hidden;
 height: 80px;
}
.showall{
 display:block;
}
</style>
<script>
function displayDiv(obj)
{
if(obj.className=="showmid")
{
obj.className="showall";
document.getElementById("btnDisplay").value="隐藏";
}
else
{
obj.className="showmid";
document.getElementById("btnDisplay").value="显示全部";
}
}
</script> 

 

 

 <input type="button" name="btnDisplay" value="显示全部" οnclick="displayDiv(document.getElementById('divOrders'))" class="btn" />

 

<div id="divOrders" class="showmid">
    asdfasdfasfas

内容

  </DIV>

Logo

汇聚全球AI编程工具,助力开发者即刻编程。

更多推荐