2009-10-08 118 views

回答

3

$('#hat').attr('re');

会得到它

$('#hat').attr('re', 'blah'); 

将其设置为

2

如果要更新重属性的值简单地写:

$('#hat').attr('re', 'newValue'); 
+0

我如何获得价值? – TIMEX 2009-10-08 22:09:02

+0

的值将是$('#hat')。attr('re') – 2009-10-08 22:46:22