Jos*_*Baz 0 javascript jquery
show()不起作用
http://jsfiddle.net/Pppy6/5/
<div class="hello" id="hello">2<div class="ola" id="ola">showMe!</div></div> .ola { display:none }? $('#hello').text(parseInt($('#hello').text()) + 1); $('#ola').show();
Poi*_*nty 8
当您调用.text()设置内容时,您将删除其他元素..show()换句话说,调用不起作用,因为元素消失了.
.text()
.show()
您可以将文本放在<span>元素或其他内容中,然后替换其文本.
<span>
归档时间:
13 年,1 月 前
查看次数:
78 次
最近记录: