答案 0 :(得分:2)
您只需要声明链接而不是输入。
在班级列表中,添加您要显示的id
的{{1}}。
div
然后像这样绑定它:
Click a button to make it visible:
<div id="intro-tekst">Intro text here !</div>
<div class="boxes" id="coke">Coke is awesome!</div>
<div class="boxes" id="bubble-tea">Bubble tea is da bomb!</div>
<div class="boxes" id="milk">Milk is healthy!</div>
<br />
<p>
I change my mind:
<ul>
<li><a href="javascript:void(0);" class="link coke">Coke</a></li>
<li><a href="javascript:void(0);" class="link bubble-tea">Bubble Tea</a></li>
<li><a href="javascript:void(0);" class="link milk">Milk</a></li>
</ul>
</p>
这里的JsFiddle代码: http://jsfiddle.net/Pq5Cv/8/
答案 1 :(得分:0)