昨天,今天,明天,每天的每天,你是否都多懂得一点点...

星期三, 十月 14, 2009

Dom class attribute

class is not really a attribute, that's why we cannot get it by using GetAttribute() method. 

The only reason of using class is applying css to a dom object. How about style attribute and id attribute?

Id should be a real attribute although it can be used to apply css. It's a identify of a dom object. we can use GetElementByID to get a dom object. 

We can use style= to specify css for dom objects. style may not be a real attribute either. 

All by guessing :)

--
Feng

没有评论:

其它博客地址

此博客的同步博客地址: http://fengnz.wordpress.com
这里进入我的MSN SPACE.