Добрый день, возник вопрос, есть 3 группы radio button, нужно что-бы при различных комбинациях выводилась определённая картинка, под каждую комбинацию своя. Помогите советом как это организовать ?
CODE ( html):
скопировать код в буфер обмена
<input type="radio" name="1" class="radio" id="radio-1" value="001" > <input type="radio" name="1" class="radio" id="radio-002" value="002"> <input type="radio" name="1" class="radio" id="radio-003" value="003" > <input type="radio" name="2" class="radio" id="radio-004" value="004" > <input type="radio" name="2" class="radio" id="radio-005" value="005" > <input type="radio" name="2" class="radio" id="radio-006" value="006" > <input type="radio" name="3" class="radio" id="radio-007" value="007" > <input type="radio" name="3" class="radio" id="radio-008" value="008" > <input type="radio" name="3" class="radio" id="radio-009" value="009" >
Полный HTML код CODE ( html):
скопировать код в буфер обмена
<html> <head> <title>asdqwe</title> <style type="text/css"> div.image1 {float:left; margin-left: 5px;} div.image2 {float:left; margin-left: 5px;} div.image3 {float:left; margin-left: 5px;} .image1:first-child, .image2:first-child, .image3:first-child { clear: both;} </style> </head> <body> <p>Pick materials</p> <div class="color-params" id="col-params" style="display: block;"> <p> Choose a color </p> <div class="image1"> <div id="image001"> <img src="\Users\cruel\Desktop\htmllll\color1.jpg" width="80"> <div class="select-image"></div> </div> <p> <input type="radio" name="1" class="radio" id="radio-1" value="001" > "color1" </p> </div> <div class="image1"> <div id="image002"> <img src="\Users\cruel\Desktop\htmllll\color2.jpg" width="80"> <div class="select-image"></div> </div> <p> <input type="radio" name="1" class="radio" id="radio-2" value="002" > "color2" </p> </div> <div class="image1"> <div id="image003"> <img src="\Users\cruel\Desktop\htmllll\color3.jpg" width="80"> <div class="select-image"></div> </div> <p> <input type="radio" name="1" class="radio" id="radio-3" value="003" > "color3" </p> </div> </div> <div class="elbow-params" id="el-params" > <div class="image2"> <div id="image004"> <img src="\Users\cruel\Desktop\htmllll\elbow1.jpg" width="80"> <div class="select-image"></div> </div> <p> <input type="radio" name="1" class="radio" id="radio-4" value="004" > "elbow1" </p> </div> <div class="image2"> <div id="image005"> <img src="\Users\cruel\Desktop\htmllll\elbow2.jpg" width="80"> <div class="select-image"></div> </div> <p> <input type="radio" name="1" class="radio" id="radio-5" value="005" > "elbow2" </p> </div> <div class="image2"> <div id="image006"> <img src="\Users\cruel\Desktop\htmllll\elbow3.jpg" width="80"> <div class="select-image"></div> </div> <p> <input type="radio" name="1" class="radio" id="radio-6" value="006" > "elbow3" </p> </div> <div class="wheel-params" id="whl-params" style="display:block;"> <div class="image3"> <div id="image007"> <img src="\Users\cruel\Desktop\htmllll\wheel1.jpg" width="80"> <div class="select-image"></div> </div> <p> <input type="radio" name="1" class="radio" id="radio-7" value="007" > "wheel1" </p> </div> <div class="image3"> <div id="image008"> <img src="\Users\cruel\Desktop\htmllll\wheel2.jpg" width="80"> <div class="select-image"></div> </div> <p> <input type="radio" name="1" class="radio" id="radio-8" value="008" > "wheel2" </p> </div> <div class="image3"> <div id="image009"> <img src="\Users\cruel\Desktop\htmllll\wheel3.jpg" width="80"> <div class="select-image"></div> </div> <p> <input type="radio" name="3" class="radio" id="9" value="9" > "wheel3" </p> </div> </body> </html>
(Отредактировано автором: 24 Ноября, 2016 - 15:43:59)
|