【问题标题】:PrototypeJS: Wildcard 'starts-with' id selector?PrototypeJS:通配符“开始于”id 选择器?
【发布时间】:2014-02-03 20:11:28
【问题描述】:

使用 JQuery 可以通过以下方式实现:

$("[id^='thestart']");  

这可以用 Prototype-JS 实现吗?

【问题讨论】:

    标签: css-selectors prototypejs wildcard


    【解决方案1】:

    你可以使用'$$'来做到这一点:

    $$("[id^='thestart']")
    

    请记住,与 '$' 不同,'$$' 返回一个元素数组。

    【讨论】:

      猜你喜欢
      • 2011-04-11
      • 2010-12-28
      • 1970-01-01
      • 1970-01-01
      • 2016-03-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-07-19
      相关资源
      最近更新 更多