how can I change the style of each element by name?
I would like to change all elements, that have the name "hiddenElement" with jquery
alle elements should get the style
style.display='none';
style.position='absolute';
How is the syntax in jquery?
做这个
$("[name='hiddenElement']").hide().css("position", "absolute");
尝试:
$("[name='hiddenElement']").hide().css("position","absolute");
您可以使用[attribute=value]
来选择匹配的元素
$(*[name=hiddenElement]).css({'display':none,'position':'absolute'});
链接地址: http://www.djcxy.com/p/36284.html
下一篇: 我怎样才能改变每个元素的名称?