Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在一个漂亮的原型或 jQuery 风格的快捷方式中轻松地为表单中所有具有相同名称的单选按钮设置样式。
$('billship').select('name:shipType')或类似的东西。
$('billship').select('name:shipType')
是否存在这种表单字段名称的快捷方式?
使用 jQuery:
$('#billship input:radio[name="shipType"]'); $('input:radio[name="shipType"]', '#billship');
两者是等效的,但第二个表现稍好一些,我个人更喜欢它。
使用 Prototype,我相信它会是这样的:
$$('#billship input[type="radio"][name="shipType"]');