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

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

angularJS中form表單提交具體項(xiàng)目代碼如下,提交時(shí)候出現(xiàn)數(shù)據(jù)不全也能提交的情況。忘大神幫忙解答

angularJS中form表單提交具體項(xiàng)目代碼如下,提交時(shí)候出現(xiàn)數(shù)據(jù)不全也能提交的情況。忘大神幫忙解答

慕虎8944357 2016-11-30 15:43:45
????? <script type="text/ng-template " id="myModalContent.html ">?? ??? ??? ?<form name="merchantForm " class="bs-example form-horizontal form-validation " ng-submit="ok() ">?? ??? ??? ??? ?<div class="modal-body ">?? ??? ??? ??? ??? ?<div class="panel panel-default ">?? ??? ??? ??? ??? ??? ?<div class="panel-heading font-bold ">{{title}}</div>?? ??? ??? ??? ??? ??? ?<div class="panel-body ">?? ??? ??? ??? ??? ??? ??? ?<div class="form-group ">?? ??? ??? ??? ??? ??? ??? ??? ?<label class="col-lg-3 control-label ">商戶名稱</label>?? ??? ??? ??? ??? ??? ??? ??? ?<div class="col-lg-9 ">?? ??? ??? ??? ??? ??? ??? ??? ??? ?<input type="text " class="form-control " placeholder="商戶名稱 " ng-model="merchant.name " required ng-maxlength="32 ">?? ??? ??? ??? ??? ??? ??? ??? ??? ?<!--<span class="help-block m-b-none ">Example block-level help text here.</span>-->?? ??? ??? ??? ??? ??? ??? ??? ?</div>?? ??? ??? ??? ??? ??? ??? ?</div>?? ??? ??? ??? ??? ??? ??? ?<div class="form-group ">?? ??? ??? ??? ??? ??? ??? ??? ?<label class="col-lg-3 control-label ">商戶地址</label>?? ??? ??? ??? ??? ??? ??? ??? ?<div class="col-lg-9 ">?? ??? ??? ??? ??? ??? ??? ??? ??? ?<input type="text " class="form-control " placeholder="商戶地址 " ng-model="merchant.address " required ng-maxlength="64 ">?? ??? ??? ??? ??? ??? ??? ??? ??? ?<!--<span class="help-block m-b-none ">Example block-level help text here.</span>-->?? ??? ??? ??? ??? ??? ??? ??? ?</div>?? ??? ??? ??? ??? ??? ??? ?</div>?? ??? ??? ??? ??? ??? ??? ?<div class="form-group ">?? ??? ??? ??? ??? ??? ??? ??? ?<label class="col-lg-3 control-label ">聯(lián)系人</label>?? ??? ??? ??? ??? ??? ??? ??? ?<div class="col-lg-9 ">?? ??? ??? ??? ??? ??? ??? ??? ??? ?<input type="text " class="form-control " placeholder="聯(lián)系人 " ng-model="user.realName " required ng-maxlength="16 ">?? ??? ??? ??? ??? ??? ??? ??? ??? ?<!--<span class="help-block m-b-none ">Example block-level help text here.</span>-->?? ??? ??? ??? ??? ??? ??? ??? ?</div>?? ??? ??? ??? ??? ??? ??? ?</div>?? ??? ??? ??? ??? ??? ??? ?<div class="form-group ">?? ??? ??? ??? ??? ??? ??? ??? ?<label class="col-lg-3 control-label ">聯(lián)系電話</label>?? ??? ??? ??? ??? ??? ??? ??? ?<div class="col-lg-9 ">?? ??? ??? ??? ??? ??? ??? ??? ??? ?<input type="phone" class="form-control " placeholder="聯(lián)系電話 " ng-model="user.phone " required? ng-pattern="/^1[3|4|5|7|8][0-9]\d{8}$/" ng-maxlength="11" popover="請(qǐng)輸入您的手機(jī)號(hào)碼。" popover-trigger="focus">?? ??? ??? ??? ??? ??? ??? ??? ??? ?<!--<span class="help-block m-b-none ">Example block-level help text here.</span>-->?? ??? ??? ??? ??? ??? ??? ??? ?</div>?? ??? ??? ??? ??? ??? ??? ?</div>?? ??? ??? ??? ??? ??? ??? ?<div class="form-group ">?? ??? ??? ??? ??? ??? ??? ??? ?<label class="col-lg-3 control-label ">管理員賬號(hào)</label>?? ??? ??? ??? ??? ??? ??? ??? ?<div class="col-lg-9 ">?? ??? ??? ??? ??? ??? ??? ??? ??? ?<input type="text " class="form-control " placeholder="管理員賬號(hào) " ng-model="user.loginName " required ng-maxlength="16" ng-pattern="/^[a-zA-Z]\w{5,15}$/" popover="請(qǐng)輸入一個(gè)字母開頭,6-16字節(jié)的登錄賬號(hào)。" popover-trigger="focus">?? ??? ??? ??? ??? ??? ??? ??? ??? ?<!--<span class="help-block m-b-none ">Example block-level help text here.</span>-->?? ??? ??? ??? ??? ??? ??? ??? ?</div>?? ??? ??? ??? ??? ??? ??? ?</div>?? ??? ??? ??? ??? ??? ??? ?<div class="form-group ">?? ??? ??? ??? ??? ??? ??? ??? ?<label class="col-lg-3 control-label ">管理員密碼</label>?? ??? ??? ??? ??? ??? ??? ??? ?<div class="col-lg-9 ">?? ??? ??? ??? ??? ??? ??? ??? ??? ?<input type="password" class="form-control " placeholder="管理員密碼 " name="password " ng-model="user.password " required ng-maxlength="32" ng-pattern="/^[a-zA-Z]\w{5,15}$/"? popover="請(qǐng)輸入一個(gè)字母開頭,6-16字節(jié)的登錄密碼。">?? ??? ??? ??? ??? ??? ??? ??? ?</div>?? ??? ??? ??? ??? ??? ??? ?</div>?? ??? ??? ??? ??? ??? ??? ?<div class="form-group ">?? ??? ??? ??? ??? ??? ??? ??? ?<label class="col-lg-3 control-label ">確認(rèn)密碼</label>?? ??? ??? ??? ??? ??? ??? ??? ?<div class="col-lg-9 ">?? ??? ??? ??? ??? ??? ??? ??? ??? ?<input type="password" class="form-control " placeholder="確認(rèn)密碼 " name="confirmPassword " popover="請(qǐng)?jiān)俅未_認(rèn)您的密碼。" popover-trigger="focus" ng-model="user.confirmPassword " required ng-pattern="/^[a-zA-Z]\w{5,15}$/" ng-maxlength="32 " ui-validate=" '$value==user.password' " ui-validate-watch=" 'user.password' ">?? ??? ??? ??? ??? ??? ??? ??? ??? ?<span ng-show='merchantForm.confirmPassword.$error.validator'>確認(rèn)密碼不正確</span>?? ??? ??? ??? ??? ??? ??? ??? ?</div>?? ??? ??? ??? ??? ??? ??? ?</div>?? ??? ??? ??? ??? ??? ??? ?<div class="text-danger wrapper text-center " ng-show="authError ">?? ??? ??? ??? ??? ??? ??? ??? ?{{authError}}?? ??? ??? ??? ??? ??? ??? ?</div>?? ??? ??? ??? ??? ??? ?</div>?? ??? ??? ??? ??? ?</div>?? ??? ??? ??? ?</div>?? ??? ??? ??? ?<div class="modal-footer ">?? ??? ??? ??? ??? ?<button type="submit " class="btn btn-primary ">確認(rèn)</button>?? ??? ??? ??? ??? ?<button type="button " class="btn btn-default " ng-click="cancel() ">取消</button>?? ??? ??? ??? ?</div>?? ??? ??? ?</form>?? ??? ?</script>?? ?</div>
查看完整描述

1 回答

?
__innocence

TA貢獻(xiàn)313條經(jīng)驗(yàn) 獲得超208個(gè)贊

這個(gè)問題很好解決,我是這樣解決的:

<button type="submit" class="btn btn-primary" ng-disabled="SignUpForm.$invalid">提交</button>

SignUpForm是我自己表單的id,你可以換一下

這個(gè)意思就是:如果存在不合法的驗(yàn)證,按鈕就是不可點(diǎn)的狀態(tài)

查看完整回答
反對(duì) 回復(fù) 2016-12-03
  • 慕虎8944357
    慕虎8944357
    我本來是這么寫的,但是老大說禁選按鈕會(huì)影響用戶體驗(yàn),請(qǐng)問有沒有更好的辦法。
  • 1 回答
  • 0 關(guān)注
  • 2475 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)