2249
0
admin
IP 编辑 禁止 帖子 清理
使用道具
6
Loris
设定一个div块
<input type="button" id="hide_show">
<div id="show_hide" style="display:none;"></div>
这个div块 默认状态下是隐藏的
$('#hide_show').click(function(){
if($('#show_hide').is(':hidden')){ $('#hide_show').show(); }else{ $('#hide_show').hide(); }
});
管理
1402
马鹏磊
先设置想要隐藏的元素的 id="ul2" style="display:none;"
再 设置一个 点击就显示的按钮 id="show" value="显示"
隐藏:$('#ul2').hide();
显示:$('#ul2').show(); $('#show').click(function() { if($('#show').val()=='显示'){ $('#ul2').show(); $('#show').val('隐藏'); }else if($('#show').val()=='隐藏'){ $('#ul2').hide(); $('#show').val('显示'); } });
$('#show').click(function() { if($('#show').val()=='显示'){ $('#ul2').show(); $('#show').val('隐藏'); }else if($('#show').val()=='隐藏'){ $('#ul2').hide(); $('#show').val('显示'); } });
1636
renmihe
隐藏hide()
显示show()
1932
740317431
hide()
show()
1902
王之神判
1694
wulinan
435
雒鑫鑫
ON SHOW
站点统计|举报|Archiver|手机版|小黑屋|Comsenz Inc.
GMT+8, , Processed in 0.195171 second(s), 9 queries .
Powered by javakc! X1.0
© 2004-2014 javakc
f1208.com 备案号:京ICP备14030918号-1