W3C提供了以下办法可以直接改变html中某个element的样式:
element.className = 'newClassName';
或者
element.styleName = 'newStyleName';
参见:
http://www.howtocreate.co.uk/tutorials/index.php?tut=0&part=27
你可以使用这个链接引用该篇文章 http://publishblog.blogchina.com/blog/tb.b?diaryID=2005942