摘要:判斷輸入為數字:欄位.match(regexp)
if($scope.model.tableCd != undefined) {
alert($scope.model.tableCd.substring(0,1).match(/^[0-9]/) != null);
}
if(!$scope.model.tcbcFaxNo.match(/[0-9]+$/))
{
bootbox.alert("傳真號碼需為數字!", function() {
$timeout(function() {
$scope.model.tcbcFaxNo = '';
angular.element('#tcbcFaxNo').focus();
});
});
}