div+js点击展开更多代码
作者:hwarker 日期:2013-11-11
<div id="a" style="height:100px;width:200px;overflow:hidden;">
div查看更多代码 js点击展开更多代码。测试内容,随便写多少都可以。
</div>
<a href="javascript:void(0)" id="show" onclick="document.getElementById('a').style.height='500px';document.getElementById('hidden').style.display='';document.getElementById('show').style.display='none';">展开</a>
<a href="javascript:void(0)" id="hidden" style="display:none;" onclick="document.getElementById('a').style.height='100px';document.getElementById('hidden').style.display='none';document.getElementById('show').style.display='';">关闭</a>
评论: 0 | 引用: 0 | 查看次数: -
发表评论