【发布时间】:2018-01-31 17:23:22
【问题描述】:
我正在尝试获取复选框的值,但我选中了复选框,将值设置为 true 和 false,但我不想要这个。
<div class="checkbox checkbox-warning">
<input type="checkbox" ng-model="search.industries" ng-init="search.industries = i.name" value="{{i.name}}" class="styled" id="industry-{{i.id}}" data-taggable="1" data-tag-id="i-agriculture-fisheries-plantation">
{{search.industries | json}}
<label for="industry-{{i.id}}">{{i.name}}</label>
</div>
我只想得到我在 {{i.name}} 中得到的值。我已经通过使用这些代码行进行了尝试,但仍然将值设为 true n false。
请帮我搞定这个。 提前致谢。
【问题讨论】:
-
I'm trying to get the value of value of check box- 你想在哪里得到它?你的代码在哪里? -
一个复选框实际上是用于提供真值或假值。你想做什么?
-
我正在尝试获取 json。当我点击复选框时,在 json 中它显示为真,当我取消选中它时,它显示为假。
-
标签: angularjs