我的第一个问题在这里。我有两个选项组,当我使用两组选择的选项,我所希望的网页显示的结果DIV(不刷新页面)获取无线电检查值和切换div没有重新加载页面
我的代码如下
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-default active">
<img src="https://placehold.it/220x120" class="img-responsive img-rounded">
<input type="radio" name="location" vaule="vn" checked>Viet Nam
</label>
<label class="btn btn-default">
<img src="https://placehold.it/220x120" class="img-responsive img-rounded">
<input type="radio" name="location" vaule="us">US
</label>
<label class="btn btn-default">
<img src="https://placehold.it/220x120" class="img-responsive img-rounded">
<input type="radio" name="location" vaule="eu">Europe
</label></div>
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-default active">
<img src="https://placehold.it/220x120" class="img-responsive img-rounded">
<input type="radio" name="type" vaule="bikers" checked>bikers
</label>
<label class="btn btn-default">
<img src="https://placehold.it/220x120" class="img-responsive img-rounded">
<input type="radio" name="type" vaule="cars">cars
</label>
<label class="btn btn-default">
<img src="https://placehold.it/220x120" class="img-responsive img-rounded">
<input type="radio" name="type" vaule="planes">planes
</label>
</div>
我想,例如位置== vn AND type == biker ==>将div id = vnbiker 替换为div id = result = div id = eunotplans
当更改任何单选按钮时,结果div也应该改变(没有页面重新加载)。
你能发布代码和你目前在JsFiddle.net上工作的内容? – 2015-01-09 19:11:18