【发布时间】:2017-03-04 17:52:00
【问题描述】:
我有一个重复的组,其中包含一个日期字段,作为在日历中选择日期的按钮。
<button id="gprh_fabrik_user_registration_333_repeat___premier_rappel_co_1_cal_cal_img" class="btn calendarbutton" type="button">
选择器是
id="gprh_fabrik_user_registration_333_repeat___premier_rappel_co_0_cal_cal_img"
id="gprh_fabrik_user_registration_333_repeat___premier_rappel_co_1_cal_cal_img"
id="gprh_fabrik_user_registration_333_repeat___premier_rappel_co_2_cal_cal_img"
我已禁用我的日期字段,因为该值是以另一种形式生成的。
我现在不想显示那些重复的日期按钮。
我尝试了类似的方法,但它不起作用:
[id^=form_59_].fabrikForm [id^="gprh_fabrik_user_registration_333_repeat___premier_rappel_co_"]"_cal_cal_img" { display:none; }
非常感谢您的帮助和提示。
【问题讨论】:
-
这会起作用还是您需要指定
cal_cal_img结尾?[id^="gprh_fabrik_user_registration_333_repeat___premier_rappel_co_"] { display:none; } -
@Pangloss:你是对的。这似乎是一个足够接近的骗局,所以我要关闭它。但是在您看到您的评论之前我已经回答了它,我觉得我的回答除了链接线程之外确实增加了更多价值(就它可能具有的缺点而言),所以我将把我的回答也保留为 -是而不是删除它。
-
@Harry 我喜欢你的回答,已经投票了。
-
感谢@Pangloss :) 我将按原样保留我之前的评论,以免其他人最终询问我单独回答的理由。
标签: css css-selectors