这是我有单选按钮的代码:
<ul id="chartType" >
<li class="thumbnail">
<label>
<input type="radio" value='AreaChart' ng-model="chart.type" />
<img src="images/area.png">
</label>
</li>
<li class="thumbnail">
<label>
<input type="radio" value='PieChart' ng-model="chart.type" />
<img src="images/pie.png">
</label>
</li>
<li class="thumbnail">
<label>
<input type="radio" value='ColumnChart' ng-model="chart.type" />
<img src="images/column.png" >
</label>
</li>
</ul>
我想要的是这样的(即,当用户点击li或img时,它的工作方式与上面的代码相同):
<ul id="chartType" >
<li class="thumbnail">
<img src="images/area.png">
</li>
<li class="thumbnail">
<img src="images/pie.png">
</li>
<li class="thumbnail">
<img src="images/column.png" >
</li>
</ul>