如何使用mootools替换样式类

时间:2010-12-07 04:58:54

标签: css mootools

如何用mootools.Consider替换样式类,

<form>
<div class="form-label">
    <label>User ID</label>
</div>
<div class="form-element">
    <input type="text"  name="userid">
</div>
<div class="form-label">
    <label>password</label>
</div>
<div class="form-element">
    <input type="text"  name="password">
</div>
 </form>

在这里,我想将样式类form-label替换为form-label-new

谢谢

1 个答案:

答案 0 :(得分:0)

$$('.form-label').set('class', 'form-label-new');