我的第一個問題在這裏。我有兩個選項組,當我使用兩組選擇的選項,我所希望的網頁顯示的結果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