给出具有这种标记类型的属性:
<label r4e-toggle="" class="sm ng-scope ng-isolate-scope r4e-toggle"
ng-attr-disabled="{{audit.profileOptedOut || undefined}}"
tooltip="Opted In"
ng-if="audit.source.listing.correctable && audit.hasListingCorrecting">
<input type="checkbox" ng-model="audit.optedOut" ng-true-value="false"
ng-false-value="true" ng-click="location.optOutAudit($index, audit)"
ng-disabled="location.optOutDisabled"
class="ng-pristine ng-untouched ng-valid">
<span class="slider"></span>
</label>
如何通过空白的“ r4e-toggle”引用它?
答案 0 :(得分:1)
以相同的方式访问属性,无论是否存在值。可以提供更具体的值,但您只需在方括号中使用属性选择器即可。
label[r4e-toggle]
https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors