Disable/enable an input with jQuery?

后端 未结 18 2715
礼貌的吻别
礼貌的吻别 2020-11-21 07:47
$input.disabled = true;

or

$input.disabled = \"disabled\";

Which is the standard way? And, conversely, how do yo

18条回答
  •  遥遥无期
    2020-11-21 07:47

    In jQuery Mobile:

    For disable

    $('#someselectElement').selectmenu().selectmenu('disable').selectmenu('refresh', true);
    $('#someTextElement').textinput().textinput('disable');
    

    For enable

    $('#someselectElement').selectmenu().selectmenu('enable').selectmenu('refresh', true);
    $('#someTextElement').textinput('enable');
    

提交回复
热议问题