我需要清除用户单击“提交”按钮后写的输入 我不知道我必须在脚本中插入哪些代码以清除它们
<p>
<input type="text" placeholder="name" ng-model="person.name">
</p>
<p>last name: <input type="text" placeholder="last name" ng-model="person.Lname"></p>
<p>phone number: <input type="text" placeholder="number" ng-model="person.number"></p>
<button type="submit" ng-click="sabt()">submit</button>
<table class="table">
<tr>
<th>name</th>
<th>last name</th>
<th>phone number</th>
</tr>
<tr ng-repeat="x in list">
<td>{{x.name}}</td>
<td>{{x.Lname}}</td>
<td>{{x.number}}</td>
</tr>
</table>
var app = angular.module("myApp",[]);
app.controller("myCtrl",function($scope){
$scope.list=[];
$scope.person={};
$scope.sabt = function(){
$scope.list.push($scope.person);
}
});
答案 0 :(得分:2)
<meta property="og:url" content="https://example.com/xyz">