判断输入框内容是否规范,若不规范,弹出提示
程序员文章站
2024-03-05 15:52:43
...
HTML中
注意id为savemarked,和savesuccesswords存放弹窗内容
<div class="modal fade" id="savemarked" tabindex="-1" role="basic"
aria-hidden="true">
<div class="modal-dialog" style="margin-top: 200px;">
<div class="modal-content">
<div class="modal-body">
<h4>{{savesuccesswords}}</h4>
</div>
<div class="modal-footer">
<button type="button" class="btn blue btn-outline"
ng-click="closewindow()">确认</button>
</div>
</div>
</div>
</div>
在js的上报检测函数下
if($scope.Years.one.earningforeign == 0){
$scope.savesuccesswords = "2017年总资产应大于0";
$("#savemarked").modal('show');
return;
}
(可参考石嘴山“科技创新贷”贷款项目 szskjcxd)