2011-09-04 22 views

回答

0

这个例子是工作正常,我用1.0-RC3

下面是另一个:

{ 
    'attr': {'id': 'example1'}, 
    'data': { 
     'attr': { 
      'href': '#' 
     }, 
     'title': 'Example' 
    }, 
    'metadata': { 
     'hello': 'world' 
    } 
} 

,并检索元数据:

$(node).data('hello'); // world