开发者

class of a DOM and jQUery

I sometimes se开发者_如何转开发e that there is something like this:

<input name="star2" type="radio" class="star 1"/>


<input name="star2" type="radio" class="star 2"/>

is it possible in jQuery to let one class to handle these two class? Because basically they have the same parent class, which is star? If it is possible, how can I do that? Using regular expression?


Yes, you can select both of them with $('.star'). What you may have been trying to refer to is starts with attribute selector.

Also, I doubt that 1 is a valid class name.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜