jQuery - Отключите Поля Формы

Один путь состоял бы в том, чтобы установить нижнее поле:

reset session
set multiplot layout 1,2

    set xlabel "{/:Italic m} (mag)" 
    set key out horiz bot center 

    plot sin(x)

    set bmargin 5
    replot 

unset multiplot

enter image description here

55
задан user159025 7 September 2009 в 02:33
поделиться

3 ответа

<script type="text/javascript" src="jquery.js"></script>          
<script type="text/javascript">
  $(document).ready(function() {
      $("#suburb").blur(function() {
          if ($(this).val() != '')
              $("#post_code").attr("disabled", "disabled");
          else
              $("#post_code").removeAttr("disabled");
      });

      $("#post_code").blur(function() {
          if ($(this).val() != '')
              $("#suburb").attr("disabled", "disabled");
          else
              $("#suburb").removeAttr("disabled");
      });
  });
</script>

Вам также необходимо добавить атрибут значения к первому параметру в элементе select:

<option value=""></option>
113
ответ дан 26 November 2019 в 17:38
поделиться

попробуйте это

$("#inp").focus(function(){$("#sel").attr('disabled','true');});

$("#inp").blur(function(){$("#sel").removeAttr('disabled');});

и наоборот для выбора.

7
ответ дан 26 November 2019 в 17:38
поделиться
$('input, select').attr('disabled', 'disabled');
12
ответ дан 26 November 2019 в 17:38
поделиться
Другие вопросы по тегам:

Похожие вопросы: