0407日重点:表格和单元格的宽度, ng-repeat出的表格宽度, checkbox做显示隐藏效果
1.table是个大盒子,不设table的宽度,而设td的宽度是不行的。td永远不能大过table。
table设了宽度后。有多少个td,td就会平分table的宽度。
2. angularjs中 ng-repeat出的表格。要想没一个td的宽度是一样的。则必须在控制器中动态的设table宽度!
设循环数据是data,那总共循环次数就是 data.length
动态表格的宽度就是: $scope.tableWidth=(90*temp.length+90)+'px';
前台页面中<table border="1" style="width: {{tableWidth}}" ></table>
table的参考文献:http://www.cnblogs.com/mqingqing123/p/6163140.html
3. input是radio的时候,值可以随便设定.
当input是checkbox的时候,值就是布尔值,就是ture或者false
所以,可以利用这点,直接做出勾选显示,不勾选隐藏的效果
<label>有时间限制<input type="checkbox" ng-model="limited"></label>
<div ng-show="limited">
开始的日期<input type="date" >
结束的日期<input type="date" >
</div>
浙公网安备 33010602011771号