1
您好我有一些元素的元素:使用JavaScript来匹配一类模式
<div data-stage-1="hello">Hello</div>
<div data-stage-2="hello">Hello</div>
<div data-stage-3="hello">Hello</div>
使用JavaScript我怎么会通过匹配他们相似的数据属性拉这些元素到一个数组? (不是'hello',而是'data-stage-x')
我想'd.attributes [A] .indexOf'可能需要'd.attributes [A] .name.indexOf',否则巨大的答案。 – 2012-02-06 22:14:30
@Colin谢谢。我只是设置了一个测试实例来在那里找到正确的属性。你救了我一两分钟 – 2012-02-06 22:18:01