<a :data-id="hymn" id="demo"></a> // 获取自定义data数据 $("#demo").data("id") // 设置data数据 $("#demo").data("id","123")