第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

js 中的多個輸入......?

js 中的多個輸入......?

守候你守候我 2021-06-02 00:10:18
它有效 - 當輸入 #key1 為空時,我無法單擊按鈕。但我需要使用兩個輸入 - #key1 和 #key2。待辦事項 - 當兩者都為空或 1/2 時,沒有人不能點擊按鈕。謝謝??!<script type='text/javascript' src='http://code.jquery.com/jquery.min.js'></script><script type='text/javascript'>  $(function() {    $('#key1').keyup(function() {      if ($(this).val() == '') {        //Check to see if there is any text entered        // If there is no text within the input ten disable the button        $('.enableOnInput').prop('disabled', true);      } else {        //If there is text in the input, then enable the button        $('.enableOnInput').prop('disabled', false);      }    });  });</script>
查看完整描述

2 回答

?
桃花長相依

TA貢獻1860條經驗 獲得超8個贊

不確定我是否理解但告訴我


<script type='text/javascript'>

  $(function() {

    var button1 = $('#key1');

    var button2 = $('#key2');


    function keyUp(){

      console.log('1', button1.val());

      console.log('2', button2.val());


      var hasValue = ( button1.val() !== '' || button1.val() !== '');

      $('.enableOnInput').prop('disabled', hasValue);

    }


    button1.keyup(keyUp);

    button2.keyup(keyUp);

  });

</script>


查看完整回答
反對 回復 2021-06-03
  • 2 回答
  • 0 關注
  • 138 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號