Показать сообщение отдельно
  #2 (permalink)  
Старый 05.08.2015, 16:50
Профессор
Отправить личное сообщение для Decode Посмотреть профиль Найти все сообщения от Decode
 
Регистрация: 31.01.2015
Сообщений: 576

nikto93i7, так?

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8" />
  <title></title>
</head>
<body>
  <div class="value_two">
    <label class="radio1">
      <input id="radio1" type="radio" name="two" checked="checked" />
      <span class="radio-text1"></span>
    </label> 
    <label class="radio2">
      <input id="radio2" type="radio" name="two" />
      <span class="radio-text2"></span>
    </label> 
    <label class="radio3">
      <input id="radio3" type="radio" name="two" />
      <span class="radio-text3"></span>
    </label> 
    <label class="radio4">
      <input id="radio4" type="radio" name="two" />
      <span class="radio-text4"></span>
    </label>
    <label class="radio5">
      <input id="radio5" type="radio" name="two" />
      <span class="radio-text1"></span>
    </label> 
    <label class="radio6">
      <input id="radio6" type="radio" name="two" />
      <span class="radio-text2"></span>
    </label> 
    <label class="radio7">
      <input id="radio7" type="radio" name="two" />
      <span class="radio-text3"></span>
    </label> 
    <label class="radio8">
      <input id="radio8" type="radio" name="two" />
      <span class="radio-text4"></span>
    </label>
    <label class="radio9">
      <input id="radio9" type="radio" name="two" />
      <span class="radio-text3"></span>
    </label> 
    <label class="radio10">
      <input id="radio10" type="radio" name="two" />
      <span class="radio-text4"></span>
    </label>
  </div>

  <select id="char_platform" class="option_menu_style">
    <option class="car3_5" value="1">3.5t 32 kWh</option>
    <option class="car3_5" value="2">3.5t 42 kWh</option>
    <option class="car3_5" value="3">3.5t 52 kWh</option>

    <option class="car5_5" value="4">5.5t 32 kWh</option>
    <option class="car5_5" value="5">5.5t 42 kWh</option>
    <option class="car5_5" value="6">5.5t 52 kWh</option>

    <option class="car9_5" value="7">9.5t 52 kWh</option>
    <option class="car9_5" value="8">9.5t 62 kWh</option>

    <option class="car26" value="9">26t 60 kWh</option>
    <option class="car26" value="10">26t 62 kWh</option>
  </select>

  <script src="https://code.jquery.com/jquery-1.11.3.js"></script>
  <script>
    $('input[type="radio"]').change(function( event ) {
      var inpValue = event.target.id.match(/\d+/);
      $("#char_platform option[value="+ inpValue + "]").attr("selected", "selected");
    });
  </script>
</body>
</html>
Ответить с цитированием