js控制輸入框禁止輸入和允許輸入

初始,部分輸入框禁止輸入:

$(document).ready(function(){

$("#fundCode").prop("disabled",true);

$("#convertFundCode").prop("disabled",true);

$("#allowtradeVol").prop("disabled",true);

$("#appVol").prop("disabled",true);

$("#passwd").prop("disabled",true);

$("#confirmBtn").prop("disabled",true);

if($("#custType2").val() == null || $("#custType2").val() == ""){

$("#selectBtn").prop("disabled", true);

}

});

當(dāng)點(diǎn)擊按鈕之后,鼠標(biāo)移出按鈕,部分輸入框允許輸入,并且另一部分禁止輸入:

$("#selectBtn").click(function(){

? ? ? ?$("#selectBtn").mousemove(function(){

?????????????????????????????????? $("#appVol").prop("disabled", false);

? ? ? ? ? ?$("#fundCode").prop("disabled", false);

? ? ? ? ? ?$("#adviserCode").prop("disabled", false);

? ? ? ? ? ?$("#convertFundCode").prop("disabled", false);

? ? ? ? ? ?$("#passwd").prop("disabled", false);


? ? ? ? ? ?$("#selectBtn").prop("disabled", true);

? ? ? ? ? ?$("#riskLevel").prop("disabled", true);

? ? ? ? ? ?$("#financeAcc").prop("disabled", true);

? ? ? ? ? ?$("#custType").prop("disabled", true);

? ? ? ? ? ?$("#accNo").prop("disabled", true);

????????????????? }

});

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • "use strict";function _classCallCheck(e,t){if(!(e instanc...
    久些閱讀 2,157評(píng)論 0 2
  • 單例模式 適用場(chǎng)景:可能會(huì)在場(chǎng)景中使用到對(duì)象,但只有一個(gè)實(shí)例,加載時(shí)并不主動(dòng)創(chuàng)建,需要時(shí)才創(chuàng)建 最常見的單例模式,...
    Obeing閱讀 2,321評(píng)論 1 10
  • 找到fullcalendar.js, 找到代碼為 isRTL:false,這句話 輸入以下幾句 monthName...
    迷你小小白閱讀 1,876評(píng)論 0 1
  • 一、Python簡介和環(huán)境搭建以及pip的安裝 4課時(shí)實(shí)驗(yàn)課主要內(nèi)容 【Python簡介】: Python 是一個(gè)...
    _小老虎_閱讀 6,361評(píng)論 0 10
  • ¥開啟¥ 【iAPP實(shí)現(xiàn)進(jìn)入界面執(zhí)行逐一顯】 〖2017-08-25 15:22:14〗 《//首先開一個(gè)線程,因...
    小菜c閱讀 7,391評(píng)論 0 17

友情鏈接更多精彩內(nèi)容