它有效 - 當輸入 #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>
js 中的多個輸入......?
守候你守候我
2021-06-02 00:10:18