添加指定的样式名到元素中。
元素的引用。
元素的样式类可以包含多个类名,并用空格分开。该方法将添加一个新的类名给元素,如果元素已经包含该类名,方法则提前返回。
<div id="box" class="content" >内容......</div> <input type="button" value="显示" onclick="$('box').addClassName('news')" /> // The "box" has two className: content & news