angularJs复选框checkbox选中进行ng-show显示隐藏
来源:互联网 发布:profili2.3软件下载 编辑:程序博客网 时间:2024/05/24 06:54
ng-true-value="1" //代表选中的时候,值为1ng-false-value="0" //代表未选中的时候,值为0
<!doctype html><html lang="en"><head> <meta charset="UTF-8"> <script src="angular.min.js"></script></head><body><div ng-app="module" ng-controller="ctrl"> 游戏: <input type="checkbox" ng-model="data.game" ng-true-value="1" ng-false-value="0"> 电影: <input type="checkbox" ng-model="data.video" ng-true-value="1" ng-false-value="0"> <div ng-show="data.game==1"> <h1>游戏被选中</h1> </div> <div ng-show="data.video==1"> <h1>电影被选中</h1> </div></div><script> var m = angular.module('module', []); m.controller('ctrl', ['$scope', function ($scope) { $scope.data = {game: 0, video: 0}; //初始化未选中,值为0 }]);</script></body></html>
阅读全文
0 0
- angularJs复选框checkbox选中进行ng-show显示隐藏
- AngularJS判断checkbox/复选框是否选中并实时显示
- angularJs ng-show命令隐藏
- angularjs中的复选框checkbox
- 通过checkBox复选框来隐藏和显示密码
- 去除/隐藏QStandardItem已显示的复选框(CheckBox)
- angularjs ng-show ng-hidden
- AngularJs -- ng-show
- AngularJS ng-show指令
- angular中的显示与隐藏ng-show/ng-hide/ng-if/ng-switch
- 多个复选框checkbox选中问题
- checkbox复选框选中表格中的行
- 复选框(checkbox)多个选中问题
- Excel-VBA: 复选框CheckBox是否选中
- AngularJS之ng-show指令
- angularjs ng-show的用法
- AngularJS的ng-show标签
- angularJs中的ng-show指令
- 读取class根下的文件
- MongoDB进阶(九)Java中实现MongoDB自增主键ID
- 【c++语言基础】字符串数组与字符串
- 多张图片一起播放,动画
- linux系统上编译arm版的protobuf库
- angularJs复选框checkbox选中进行ng-show显示隐藏
- mysql case when
- 利用Shell脚本验证RMAN备份集和做定期恢复实验
- 腾讯专家分享:腾讯做业务监控的心得和经验
- 教你如何编写简单的网络爬虫
- mysql更改root用户密码
- gcc undefined reference to
- 一步一步完成小说下载阅读器之架构设计(一)
- dos copy