1. <button id="btn" data-aid="123456" onclick="go(event)">
    2. btn
    3. </button>
    1. /* 内联事件
    2. 定义 data-aid="123456"
    3. 获取自定义属性值 event.target.dataset.aid
    4. */
    5. function go(event){
    6. console.log("hello world");
    7. console.log(event.target.dataset.aid);
    8. }