attributeStartsWith selector
描述: 选择指定属性是以给定字符串开始的元素
这个选择器能很方便的定位一些由服务器端框架生成的语义化的 ID,它们可能带有相同的前缀。然而这个选择器的速度要比用 class 选择器慢得多。所以如果可能的话,最好在这些元素上生成相同的 class,之后使用 class 选择器来选中它们。
例子:
Finds all inputs with an attribute name that starts with 'news' and puts text in them.
| 
          
             1 
          
            2 
          
            3 
          
            4 
          
            5 
          
            6 
          
            7 
          
            8 
          
            9 
          
            10 
          
            11 
          
            12 
          
            13 
          
            14 
          
         | 
        
          
  |