我的表格有文本輸入字段,當頁面加載時它應該隱藏,並且當我點擊它們時出現。這是我所嘗試過的,並且不起作用。但是反過來,我可以讓場地消失,當我點擊它。我希望表格有隱藏的輸入字段,只有當我點擊它們時纔會出現
<div class="container-fluid">
<table id="sampleGrid" class="table">
<thead>
<tr>
<th>Fat (Z10006)</th>
</tr>
</thead>
<tbody>
<tr>
<td><input type="text" class="col-xs-8" name="Fat" ng-if="visible" ng-click="hidden()"></td>
</tr>
</tbody>
</table>
</div>
var sampleApp =angular.module('sampleApp',[]);
sampleApp.controller('gridController',function($scope,$http) {
$scope.visible = false;
$scope.hidden = function() {
$scope.visible = true;
};
})
如何點擊隱藏的輸入欄? :-) – cjs1978
因此,無論如何要實現這一功能,我希望字段只出現在我打算。 – shafeerambatt