<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<script src="https://cdn.static.runoob.com/libs/angular.js/1.4.6/angular.min.js"></script>
</head>
<body ng-app="">
<form action="demo-form.php">
<textarea name="comment" required></textarea>
<input type="submit">
</form>

<!--上下两种方案效果一样。加不加ng-disabled="form1.$invalid"目前看来是一样的-->

<form action="demo-form.php" name="form1">
<textarea name="comment" required></textarea>
<input type="submit" ng-disabled="form1.$invalid">
</form>
</body>
</html>

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-16
  • 2022-12-23
  • 2021-12-14
  • 2022-12-23
  • 2021-09-17
猜你喜欢
  • 2022-12-23
  • 2021-11-28
  • 2021-11-28
  • 2022-12-23
  • 2022-12-23
  • 2021-07-18
相关资源
相似解决方案