getAttribute方法
setAttribute方法
removeAttribute方法
注意:而在jQuery中用一個attr()與removeAttr()就可以全部搞定了,包括相容問題
【3】注意:擷取Attribute就需要用attr,擷取Property就需要用prop
getAttribute方法
setAttribute方法
removeAttribute方法
注意:而在jQuery中用一個attr()與removeAttr()就可以全部搞定了,包括相容問題
【3】注意:擷取Attribute就需要用attr,擷取Property就需要用prop