2010-11-19 22 views

回答

3

$$('.classname')[0].readAttribute('href');

注意$$總是會返回一個數組。

0
$$('.className')[0].readAttribute('href') 
0

$$('。classname')。pluck('href');

這將返回一個值爲href的數組,以防萬一需要多個值。