Heim > Fragen und Antworten > Hauptteil
<!DOCTYPE html>
<html lang="en" ng-app="app">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<script src="js/rem.js"></script>
<script src="js/Angular.js"></script>
<title>longin</title>
<style>
body{
padding-top:1.5rem;
display: flex;
justify-content: center;
align-items: center;
font-size: 16px
}
input{
}
</style>
</head>
<body>
<p class="con" ng-controller="defaultCtrl">
<h1>律所SaaS系统</h1>
<p class="longin">
<h3>登录</h3>
<p class="phoneNub">
<span>手机号</span>
<input type="number" ng-model="phone" ng-change="check()">
</p>
<p class="yzm">
<span>验证码</span>
<input type="number" name="" ng-model="yzm">
<a href="" class="fsyz">获取验证码</a>
</p>
<a href="" class="loginTo">登录</a>
</p>
</p>
</body>
<script>
angular.module("app",[])
.controller("defaultCtrl",['$scope',function($scope){
$scope.phone="",
$scope.yzm="",
$scope.check = function(){
console.log("2")
if(/^1(3|4|5|7|8)\d{9}$/.test($scope.phone)){
alert("1")
}
}
}])
</script>
</html>
报错VM366:158 Uncaught TypeError: Cannot read property 'description' of undefined