2011-09-04 21 views

回答

0

這個例子是工作正常,我用1.0-RC3

下面是另一個:

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

,並檢索元數據:

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