一个页面html按钮怎样实现内容之间的转换

如题所述

第1个回答  推荐于2017-05-21
用css+js就能实现:
css:
.hide{display:none;}

html
<div class="txt1">内容1</div>
<div class="txt2 hide">内容2</div>
<a id="button"></a>

js:
$('#button').click(function(){
$('.txt1').hide();
$('.txt2').show();
});追答

标签里少了字,应该是切换

本回答被网友采纳
第2个回答  2015-11-14
请把问题描述详细点

相关了解……

你可能感兴趣的内容

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网